Please help Manipulate Arrays With unshift

Tell us what’s happening:

i enter
myArray.unshift([“paul”,35]);

and it displays
myArray.unshift([“paul”,35]);

it says it must show this
myArray should now have [[“Paul”, 35], [“dog”, 3]].

which it seems to i cannot get past this please help

Your code so far

// Example
var ourArray = ["Stimpson", "J", "cat"];
ourArray.shift(); // ourArray now equals ["J", "cat"]
ourArray.unshift("Happy"); 
// ourArray now equals ["Happy", "J", "cat"]

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

// Only change code below this line //
myArray.unshift([“Paul”, 35]);```
**Your browser information:**

Your Browser User Agent is: ```Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36```.

**Link to the challenge:**
https://www.freecodecamp.org/challenges/manipulate-arrays-with-unshift

I think your code is fine and it’s because the open and close quotation marks around the string Paul are not the correct one (ASCII code 34).

Try copy and pasting this and see if it works:

myArray.unshift(["Paul", 35]);

I hope that helps!

1 Like