MutableArray#unshiftObjects()

unshiftObjects (objects) Ember.Arraypublic

Defined in packages/ember-runtime/lib/mixins/mutable_array.js:280

Adds the named objects to the beginning of the array. Defers notifying observers until all objects have been added.

let colors = ['red'];

colors.unshiftObjects(['black', 'white']);   // ['black', 'white', 'red']
colors.unshiftObjects('yellow'); // Type Error: 'undefined' is not a function

Parameters:

objects Ember.Enumerable
the objects to add

Returns:

Ember.Array
receiver
doc_EmberJs
2016-11-30 16:52:37
Comments
Leave a Comment

Please login to continue.