Basic JavaScript: Manipulate Arrays With push()

// Setup
var myArray = [["John", 23], ["cat", 2]];

// Add a dog... ez

myArray.push(["dog",3]);

Leave a Reply

Your email address will not be published. Required fields are marked *