addObject (obj) Ember.Arraypublic
Push the object onto the end of the array if it is not already present in the array.
let cities = ['Chicago', 'Berlin'];
cities.addObject('Lima'); // ['Chicago', 'Berlin', 'Lima']
cities.addObject('Berlin'); // ['Chicago', 'Berlin', 'Lima']
Parameters:
-
obj
* - object to add, if not already present
Returns:
-
Ember.Array - receiver
Please login to continue.