Link Search Menu Expand Document

Manipulate Arrays With unshift()

Summary

  • The unshift function can be used to append data to the beginning of an array.

Final Code

// Setup
var myArray = [["John", 23], ["dog", 3]];
myArray.shift();
myArray.unshift(["Paul", 35]);
// Only change code below this line