** Manipulate Arrays With unshift():**
I have tried the bellow code but it is not working I don’t know why( please any help).
Your code so far
// Setup
const myArray = [["John", 23], ["dog", 3]];
// Only change code below this line
myArray.unshift(["Paul", 35]);
Your browser information:
User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0
Challenge: Basic JavaScript - Manipulate Arrays With unshift()
Link to the challenge:
The starting code was:
const myArray = [["John", 23], ["dog", 3]];
myArray.shift();
// Only change code below this line
You changed something above that line.
Also the test result:
myArray should now have [[“Paul”, 35], [“dog”, 3]].
should be a clue too. Put a console.log on your result to see what you are getting.
Finally i changed browser with the same code and it worked
No, the code you posted above should fail. If you restore the feed code, it will pass.
system
Closed
5
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.