Editing an existing object


#1

Ive tried a few variations and I cant seem to get the array to work in this example:

var myObject = {
name: 'Eduardo',
type: 'Most excellent',
// Add your code here!
var interests = ["art","movies","cooking"];
};

Ive also tried:
var stuff = ["art","movies","cooking"];
var myObject = {
name: 'Eduardo',
type: 'Most excellent',
// Add your code here!
interests = stuff;
};


Editing an existing object
#2

this is pretty close, but var can't be used for object properties


#3

Thats what my first entry was but its incorrect


#4

after a object property there should be a colon, not a equal sign.

after a object value there should be a comma (or nothing if it is the last entry), not a semi-colon


#5

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