Which method can be used to add new elements to an array in JavaScript?

  • append()
  • push()
  • add()
  • insert()
To add new elements to an array in JavaScript, you should use the push() method. It adds one or more elements to the end of an array. The other options are not valid methods for adding elements to an array in JavaScript.
Add your answer
Loading...

Leave a comment

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