"push: This is a relatively simple method that adds an item to the end of an array. It modifies the array in-place and the function itself returns the item added to the array."
The return value is not the pushed value, it's the length of the array when the value has been pushed.
"push: This is a relatively simple method that adds an item to the end of an array. It modifies the array in-place and the function itself returns the item added to the array."
The return value is not the pushed value, it's the length of the array when the value has been pushed.