
Software Developer, totally passionate about tech things, boardgames and mechanical engineering.
- Tweets454
- Following207
- Followers51
- Likes582

ALT Screenshot of the MDN docs site for Array.push: Syntax push(element0) push(element0, element1) push(element0, element1, /* ... ,*/ elementN) Copy to Clipboard Parameters elementN The element(s) to add to the end of the array. Return value The new length property of the object upon which the method was called. Description The push method appends values to an array. push is intentionally generic. This method can be used with call() or apply() on objects resembling arrays. The push method relies on a length property to determine where to start inserting the given values. If the length property cannot be converted into a number, the index used is 0. This includes the possibility of length being nonexistent, in which case length will also be created. Although strings are native, Array-like objects, they are not suitable in applications of this method, as strings are immutable. Similarly for the native, Array-like object arguments.



















