MutableArray#unshiftObject()

unshiftObject (obj) public

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

Unshift an object to start of array. Works just like unshift() but it is KVO-compliant.

let colors = ['red'];

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

Parameters:

obj *
object to unshift

Returns:

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

Please login to continue.