Which of the following methods mutates the original array?

  • map()
  • filter()
  • concat()
  • reduce()
The concat() method is used to concatenate two or more arrays and returns a new array. It does not mutate the original array. In contrast, methods like map(), filter(), and reduce() can modify the original array, so they should be used with caution.
Add your answer
Loading...

Leave a comment

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