Plase what is wrong with this code: Manipulate Arrays With push()

Plase what is wrong with this code: Manipulate Arrays With push()
0

#1

Tell us what’s happening:

Your code so far


// Example
var ourArray = ["Stimpson", "J", "cat"];
ourArray.push(["happy", "joy"]); 
// ourArray now equals ["Stimpson", "J", "cat", ["happy", "joy"]]

// Setup
var myArray = [["John", 23], ["cat", 2]];

// Only change code below this line.
myArray.push("dog", 3);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.3; Win64; x64) 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-push/


#2

Look at the Arrays. and check your code… It’s simply …!!


#3

This challenge requires you to push an Array inside another. That is, you need to push ONE element, which is an Array with length 2.
You are pushing pushing two elements, one String and a Number.


#4

ah, I forgot to use the myArray([]) thanks a lot @SpadeX


#5

@EdMagal I have figure it out, it was suppose to be myArray([“dog” 3]) ; anyhow thanks for your time.