Make sure you have at least four elements in myArray


var myArray
var bool1 = true;
var myObj = {
type: ‘fancy’,
disposition: ‘sunny’

myArray = [72], [bool1], [“My life”], [myObj]

Create an array, myArray. Its first element should be a number, its second should be a boolean, its third should be a string, and its fourth should be… an object! You can add as many elements of any type as you like after these first four.


What task number is this again?

  1. Heterogenous Arrays


Your just suppose to create a hetezeragus array like this…

var myArray = [1 , true , "HEy" , 3.4]


OK then, whats wrong with my info
that is what is wrong


You forgot to close your bracket…


ok, i will try that but i dont know


I mean @codeace40947 if i where to code like your way this is one result.

var myArray
var bool1 = true;
var bool2 = false;
var myObj = {
        type: 'fancy',
        disposition: 'sunny'
myArray = [72, bool1, myObj["type"], bool2]


Still doesnt work @amanuel2 its failed


you copy pasted my code and it failed? If it did what browser are you using.


chrome browser
it is the only one i use


Only solution i have for you is try this…:

myArray = [72,true,"Hello", false]


When i did that it said
Is the fourth element of myArray an object?


Sorry i forgot to put var, try this:

var myArray = [72,true,"Hello", false]


@amanuel2 That didnt help at all


Wow then i dont know what to do… Try refreshing your browser? Restarting your browser? I will call on some other moderators for help.



ok, i will try both of those


arrays look like this: [ value1, value2, etc ]

You have written 4 tiny arrays with commas between each.

Do you see the problem now?


No, i dont actually because i am starting i am new to this


Here is my code
var myArray var bool1 = true; var bool2 = false; var myObj = { type: 'fancy', disposition: 'sunny' } var myArray = [72,true,"Hello", false]