← BYTES
JavaScript·Starter·Ref: 3.1.10
What does `Array.prototype.push()` do?
Have a question about this video? Mention reference 3.1.10 when you contact us.
a.Adds one or more elements to the end of an array and returns the new length
b.Removes the last element of an array
c.Returns a new array with an element added, leaving the original unchanged
d.Sorts the array in place
`push()` mutates the original array by appending elements to its end, and its return value is the array's new length (not the array itself) -- a detail that trips people up when chaining.
Find this on YouTube & Instagram
Every BYTES video is tagged with its reference number and topic — search any of these on YouTube or Instagram to find this one:
#BYTES#BYTES3110#JavaScript