Enumerable#includes()

includes (obj) Booleanpublic

Defined in packages/ember-runtime/lib/mixins/enumerable.js:1115

Returns true if the passed object can be found in the enumerable.

[1, 2, 3].includes(2);                     // true
[1, 2, 3].includes(4);                     // false
[1, 2, undefined].includes(undefined);     // true
[1, 2, null].includes(null);               // true
[1, 2, NaN].includes(NaN);                 // true

Parameters:

obj Object
The object to search for.

Returns:

Boolean
`true` if object is found in the enumerable.
doc_EmberJs
2016-11-30 16:51:58
Comments
Leave a Comment

Please login to continue.