MutableArray#setObjects()

setObjects (objects) Ember.Arraypublic

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

Replace all the receiver's content with content of the argument. If argument is an empty array receiver will be cleared.

let colors = ['red', 'green', 'blue'];

colors.setObjects(['black', 'white']);  // ['black', 'white']
colors.setObjects([]);                  // []

Parameters:

objects Ember.Array
array whose content will be used for replacing the content of the receiver

Returns:

Ember.Array
receiver with the new content
doc_EmberJs
2016-11-30 16:52:36
Comments
Leave a Comment

Please login to continue.