freeCodeCamp Challenge Guide: Manipulate Arrays With shift()

freeCodeCamp Challenge Guide: Manipulate Arrays With shift()
0

#1

What do you do? I tried this:

// Example
var ourArray = [“Stimpson”, “J”, [“cat”]];
removedFromOurArray = ourArray.shift();
// removedFromOurArray now equals “Stimpson” and ourArray now equals [“J”, [“cat”]].

// Setup
var myArray = [[“John”, 23], [“dog”, 3]];
var myVal = myArray.shift();
// Only change code below this line.
var removedFromMyArray =myVal;


#2