pushObject (obj) public
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
Please login to continue.