Tell us what’s happening:
myArray
should now have [[“Paul”, 35], [“dog”, 3]].
should be
myArray` should now have [[“Paul”, 35],[“John”, 23], [“dog”, 3]].
it is written wrong in the challenge it is confusing for beginners so they think it removes first item and add another one
Your code so far
// Setup
var myArray = [["John", 23], ["dog", 3]];
myArray.shift();
// Only change code below this line
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36
.
Challenge: Manipulate Arrays With unshift()
Link to the challenge: