MutableArray#pushObject()

pushObject (obj) public

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

Push the object onto the end of the array. Works just like push() but it is KVO-compliant.

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

colors.pushObject('black');     // ['red', 'green', 'black']
colors.pushObject(['yellow']);  // ['red', 'green', ['yellow']]

Parameters:

obj *
object to push

Returns:

object same object passed as a param
doc_EmberJs
2016-11-30 16:52:34
Comments
Leave a Comment

Please login to continue.