Object inside Array , not able to solve


#1


https://www.codecademy.com/en/courses/javascript-beginner-en-9Sgpi/3/1?curriculum_id=506324b3a7dffd00020bf661#


Oops, try again. There was a problem with your syntax.
SyntaxError: Unexpected token

var myArray = [1, true, "apple"];

var myPC = {
model:  "lenovo";
color: "black";
};

myArray = [myPC];


#2

solved.
var myPC = {
model: "lenovo",
color: "black",
};

var myArray = [1, true, "apple", [myPC]];


#3

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