Link Search Menu Expand Document

Manipulate Arrays With push()

Summary

  • The push() function can be used to append data to the end of an array.

Final Code

// Setup
var myArray = [["John", 23], ["cat", 2]];
myArray.push(["dog", 3])
// Only change code below this line