I need help with Arrays and Objects lesson 15


#1

Im stuck on this part. It is really hard

Heres my code

var myObj = {
Birthday: "Big",
Theme: "Motorcycle"
Place: "Indoor Waterpark"
};

myArray = [myObj];
var newArray = [[1,2,5]];
console.log(newArray[1]);


#2

You have an object (myObj), and two arrays (myArray, newArray) but both of your arrays only contain one element.

You could turn newArray into a jagged array by adding myArray to newArray as a second element.


#3

is this better

var myObj = {
area: "big",
sunny: "yes"
};

var newArray = [[1,2,5],[myObj]];
console.log(newArray[1]);


#4

It looks better to me. Is it working?


#5

yes thank you!:grin: i feel better


#6

Awesome! Keep it up!


#7

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