Which of the following array methods does not mutate the original array in JavaScript?

  • splice()
  • push()
  • concat()
  • pop()
The concat() method in JavaScript creates a new array that combines the elements of the original array and the elements passed as arguments, without modifying the original array. The other methods, such as splice(), push(), and pop(), directly modify the original array.
Add your answer
Loading...

Leave a comment

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