Multiple choice

Which of the following methods of JavaScript array removes and returns an element from the beginning of an array?

  1. array.concat()

  2. array.join()

  3. array.sort()

  4. array.shift()

  5. array.reverse()

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

This method of JavaScript array removes and returns an element from the beginning of an array.