I did what is right and iam unable to understand what my mistake is?


// Setup
var myArray = [["John", 23], ["dog", 3]];
myArray.shift();

// Only change code below this line
myArray.unshift(['paul',35]);
console.log(myArray);

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.87 Safari/537.36

Challenge: Manipulate Arrays With unshift()

Link to the challenge:

In English, the first letter of a name is usually capitalized. Notice the message for the test:

myArray should now have [["Paul", 35], ["dog", 3]] .

1 Like