The method _______ can be used to add new elements to the end of an array.

  • push()
  • unshift()
  • add()
  • append()
The push() method in JavaScript can be used to add new elements to the end of an array. This method modifies the original array and is commonly used when you want to add elements to the end of an array, expanding its length. For example, myArray.push('newElement') would add 'newElement' to the end of myArray.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *