Exercise 16/17 - Is There A Bug Here?


#1

Hi the exercise simply wants you to add an interests key and give it an array value.

This is my code:

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

When it runs I get the following error:

Oops, try again.
Did you give your interests key an array value?


#2

You have to give the interests key an array value.

What they mean is that you need to add these:

Example:

[[4,5],[6,7,8]]


#3

Of Course!!!
Thanks a lot ragezapper! I think I was just too tired and going a bit mad ha!


#4

var myObject = {
name: 'Eduardo',
type: 'Most excellent',
interests: ["coding", "music", "cricket", "football", "volleyball"]// Add your code here!

};
console.log(myObject)


#5

Try this one:

var myObject = {
  name: 'yourName',
  type: 'yourType',
  interests : myInterests
}

var myInterests = ["optionOne", "optionTwo", "optionTree", "optionFour"];

#6

var myObject = {
name: 'Haris',
type: 'Most excellent',
interests : ["Haris", 23]
// Add your code here!

};


#7

var music = ["electronic","hip-hop","classic"];

var myObject = {
name: 'Eduardo',
type: 'Most excellent',
nationality : 'spain',
interests : music
};