Tell us what’s happening:
Describe your issue in detail here.
Can somebody please explain why i cant figure this 1 out ,
Your code so far
// Setup
const myArray = [["John", 23], ["dog", 3]];
// Only change code below this line
myArray.shift(); [ [ 'dog', 3 ] ]; my vscode : [ [ 'dog', 3 ] ]
myArray.unshift(["Paul", 35]); my vscode : [[ 'Paul', 35 ], [ 'dog', 3 ]]
// i also tried myArray.unshift([35]);
myArray.unshift(["Paul"]);
I Am really lost over here with this one , or is this a system error ?
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36 Edg/106.0.1370.42
Challenge: Basic JavaScript - Manipulate Arrays With unshift()
// Setup
const myArray = [["John", 23], ["dog", 3]];
myArray.shift(); //<--- already set up for you
// Only change code below this line
// your code should go here <----
but in “Your code so far” you have code that looks like its explaining what is going on, but also some extra random code that makes it a little hard to tell where you might have gone wrong. You should only need one unshift, nothing more. Single and double quotes work the same and should not matter here.
If you reset the code and only added that unshift and didnt mess with anything else then maybe. If this is basically what you have then it might be a minor issue with your browser, the test works for me. You can restart your browser, clear the cache or try it in private mode and see if it works.
// Setup
const myArray = [["John", 23], ["dog", 3]];
myArray.shift();
// Only change code below this line
myArray.unshift(['Paul', 35])