16. Editing an Existing object


#1


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


Did you create a key called interests for myObject?


var myObject = {
  name: 'Eduardo',
  type: 'Most excellent',
  // Add your code here!
  
};


#2

the error message seems pretty self explaining? You need to add key value pair to myObject


#3

For now, this object has keys name and type. You have to add a key called interests.


#4

There was a problem with your syntax.

var myObject = {
name: 'Jasmine',
type: 'Flower',
intrests: 'Band', 'Choir',
};


#5

if you want to have multiply values for your interests key (which you misspelled by the way), use an array


#6

var myObject = {
name: 'Jasmine',
type: 'Flower',
interests: [['Band'],['Choir']]
};


#7

a normal array:

['item1', 'item2']

will do, no need for a multi dimensional array


#8

it still worked what I did, but thanks for the note. I will keep this into consideration. :smile:


#9

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