Lesson 15 error


#1


https://www.codecademy.com/en/courses/javascript-beginner-en-9Sgpi/3/2?curriculum_id=506324b3a7dffd00020bf661


So whenever i click submit code i get an error, the error being -

Oops, try again.
Make sure at least one of the elements in one of your rows is an object.

But when i click submit AGAIN it works! I don't know what is up with this and am not sure what is wrong with my code


var newArray = [ [myObj, 12 , 34] , [7] ]

var myObj = {
    meme: "Rick Harrison"
}

newArray


#2

Please post your code


#3

Sorry thought i did it. Updated the thingo up top.


#4

@triple-a here check my code and you will understand what exactly it wants you to do:

var obj1 = new Object();
var newArray = [[1,"j",obj1],[1,"n"]];

Here you first create an object and then inside one of the nested arrays you put the object you just created as i have done in the code. The second array can be anything. Try this out and mark it as a solution if satisfied. :smile:


#5

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