Stuck at adding an object in an array. Any suggestions


Check out my code below.

var fruits = {
name: "bananas",
country: "dominican republic"

var myArray = [ [1],[true], ["Nice", "business", "structure"], [fruits] ];

The console is asking me if the first element of the array is a number. How come it in seeing my first element?


Replace this line with your code.


Your first element is an array.

That array's first element is a number.


lol. yes! True. Sometime all a problem needs is a simple solution.

Thx cadecodes!