Tell us what’s happening:
The directions are: Add ["Paul",35]
to the beginning of the myArray
variable using unshift()
. I got stuck.
Your code so far
// Setup
var myArray = [["John", 23], ["dog", 3]];
myArray.shift();
// Only change code below this line
myArray.unshift(["Paul", 35)], ["dog", 3]);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36
.
Challenge: Manipulate Arrays With unshift()
Link to the challenge: