Manipulate Arrays With unshift() = this should be correct

Manipulate Arrays With unshift() = this should be correct
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.
myArray.unshift("Paul",35);

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-unshift


#2

You are unshifting two elements into myArray: a string and a number.
You are required to unshift one element only: one array, which contains two elements. :slight_smile:


#3

The same as the previous challenge.

Pushing/Unshifting an array and only elements are not the same.
The challenge wants you to unshift an array.