LearnFrenzy
Sign in Take a free test

Arrays · JavaScript Arrays MCQ · Question 12

Which method changes the array? Answer, explanation & discussion

  • MCQ
  • Medium
  • 0 comments
  • Answer explained
  • Moderated community
Question 12 Back to Exercise

Which method changes the array it is called on?

  • A slice()
  • B concat()
  • C reverse() Correct
  • D toSorted()
Correct Answer: Option C

reverse (like sort, splice, push and fill) works in place and returns the same array. slice, concat and toSorted return new arrays.

Discussion & Comments 0

Share your method, a shortcut, or ask about a step you didn't follow.

No comments yet. Be the first to share your solution!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links