Link Search Menu Expand Document

Manipulate Arrays With shift()

Summary

  • The shift() function removes the first value from an array.

Final Code

// Setup
var myArray = [["John", 23], ["dog", 3]];

// Only change code below this line
var removedFromMyArray = myArray.shift();