Help I don't know what I am doing wrong!


This is my code
var myObject = {
name: 'Eduardo',
type: 'Most excellent',
interests: "javaScripts"
var newArray = [1, 2, 22, true, false, myObject]

please help the error msg says
Oops, try again. Did you give your interests key an array value?



Your error is on this line:

interests: "javaScripts"

It expects that variable to be an "array", so just make that an array and you should be good to go!


thx that was it!:sweat_smile:


A post was split to a new topic: Object in an Array


how do u make it an array