Cant figure this out

Tell us what’s happening:
Describe your issue in detail here.

Your code so far

// Setup
const myArray = [["John", 23], ["dog", 3]];

// Only change code below this line
const myArray.shift(["john, 23"])
const myArray.unshift(["Paul", 35]);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36

Challenge: Manipulate Arrays With unshift()

Link to the challenge:

Hi @Mike2106 !

I would reset the lesson.

Your answer should be one line of code.

You also don’t need to redeclare the variable.

I think it would help to look at the example code again.

const ourArray = ["Stimpson", "J", "cat"];

In the example code, we are adding the word Happy to the beginning of the array.

You need to use that same concept for this challenge.
You need to add ["Paul", 35] to the beginning of the array

Remember what I said about your answer only needing to be one line of code.
Not two.

Hope that helps!

1 Like

Thank you,Ill try it again

Thanks again,I have to remember to keep things simple,I keep over complicating the code.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.