Editing an Existing Object


#1


It wants me to add a key called interests and then add an array to that and I am not sure where I went wrong can anyone help?!


var myObject = {
  name: 'Eduardo',
  type: 'Most excellent',
  interests: 'Skiing',
  
};


#2

It seems you forgot to to add the array for interests. For example I decided to call my array oldArray. First I declared it as a var above my var myObject and then inside of it i put a string with a number boolean and 'word' then you can put that array after interests: your array to finish it


#3

Thanks I guess I got a little confused Thanks so much for the help!!


#4

No problem! Hope your coding goes well! (P.S. we all get confused sometimes :smiley: especially me xD )


#5

Can you explain more? I still didn't understand it.

Why is it asking me to put an array inside the object? I can't figure out the final code


#6

What's wrong with it?

var myObject = {
name: 'Eduardo',
type: 'Most excellent',
interests: 'soccer'

};


#7

This is what they are looking for, something similar to it.
'''
key: ['skiing', 'biking', 'surfing']
'''


#8

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