MutableArray#removeAt()

removeAt (start, len) Ember.Arraypublic

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

Remove an object at the specified index using the replace() primitive method. You can pass either a single index, or a start and a length.

If you pass a start and length that is beyond the length this method will throw an OUT_OF_RANGE_EXCEPTION.

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

colors.removeAt(0);     // ['green', 'blue', 'yellow', 'orange']
colors.removeAt(2, 2);  // ['green', 'blue']
colors.removeAt(4, 2);  // Error: Index out of range

Parameters:

start Number
index, start of range
len Number
length of passing range

Returns:

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

Please login to continue.