Not accepting Array Value


Add a key called interests to myObject. Give this key an array value (the array can contain whatever you like).
It is not accepting my code.

Replace this line with your code. 

var myArray = [true, false];
var myObject = {
  name: 'Eduardo',
  type: 'Most excellent',
  // Add your code here!
  interests: myArray[0]


interests: myArray[0]

myArray[0] is a single value (true) not an array

You have to add an array as a value of key interests
array of numbers..

[1,2,3,4,5] ?


Thanks. Changing to
interests: myArray

fixed the issue


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