Basic JavaScript - Manipulate Arrays With unshift Method

Tell us what’s happening:
Stuck on this one–what am I missing? Shift and then unshift, correct?

Your code so far

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

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

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36

Challenge: Basic JavaScript - Manipulate Arrays With unshift Method

Link to the challenge:

You have shifted twice

1 Like

facepalm

Thanks for all your help over the past few weeks!

1 Like

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