Courses / JavaScript
7. Array.prototype.push()
Adding one or more elements to the end of an array.
1 min read Chapter 7 of 99
JavaScript
Array.prototype.push()
Array.prototype.push() adds one or more elements to the end of an array.
"I need a quick way to add items to my list without losing anything."
The `push()` method appends new elements to the end of an array and returns the new length of the array. It's a simple way to grow your array dynamically.
"I need a quick way to add items to my list without losing anything."
The `push()` method appends new elements to the end of an array and returns the new length of the array. It's a simple way to grow your array dynamically.