Multiple choice technology programming languages

splice(@array,-1)

  1. Equal to Pop

  2. Equal to Push

  3. Equal to Shift

  4. Equal to Unshift

  5. Does nothing

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

splice(@array, -1) removes and returns the last element of @array, which is exactly what the pop function does. Negative indices count from the end.