Question:medium

Which array method in JavaScript is used to insert an element at the beginning of an array ?

Show Hint

To remember this: push/pop work on the end of the array, whereas unshift/shift work on the beginning of the array. The longer word in each pair adds elements (push, unshift), while the shorter word removes elements (pop, shift).
Updated On: Jun 29, 2026
  • push()
  • unshift()
  • concat()
  • pop()
Show Solution

The Correct Option is B

Solution and Explanation

Was this answer helpful?
0