Please help me to fix this? "Manipulate Arrays With unshift"

Please help me to fix this? "Manipulate Arrays With unshift"
0.0 0

#1

Tell us what’s happening:

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.


Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0.

Link to the challenge:


#2

What are you having trouble with?


#3

myArray should now have [[“Paul”, 35], [“dog”, 3]].


#4

So what have you tried to do so far?
Edit: After the shift in the setup the array is [[“dog”, 3]]. unshift acts similar to push just that it adds an element to the start of the array rather than the end, so you need to unshift something that makes the array into [[“Paul”, 35], [“dog”, 3]]