11. Arrays and objects in JS HELP requested!



Oops, try again. Is the first element of myArray a number?

var myArray = [ [4], [3 < 4], ["Hello!"], [myObject] ] 
var myObject = new Object();
myObject.name = "LoL"

If anyone could explain why this message comes up, that would be great! :slight_smile:
Already thanks alot!


the first element in your array is an array ([4]) not a number (4)


SO you say that these [] have to go away?


well, obviously since that makes it an array.


okay got it :wink: thanks!