Can the value in a javascript object be an array?


#1



I'm sorry if this is the wrong forum for this but I've
started learning javascript and hit objects. 
What I want to know is:

Can make the value in a javascript object be an array? 

So for example with the last part I finished 
I wanted to do this but it wouldn't work. Maybe 
this is just terrible programming or I'm calling it wrong? 
Or values aren't supposed to be arrays? 


var movieInfo = new Object();

movieInfo.name = [
  "Toy Story 2", 
  "Finding Nemo",
  "The Lion King"
  ];
movieInfo.review = [
  "Great story. Mean prospector.",
  "Cool animation, and funny turtles.", 
  "Great songs."
  ];

var getReview = function (movie) {
  switch(movie){

  case movieInfo.name[0]:
  return movieInfo.review[0];
  
  case movieInfo.name[1]:
  return movieInfo.review[1];
  
  case movieInfo.name[3]:
  return movieInfo.review[3];
 
  
  default: 'I don\'t know!';
  }
};


#2

a syntax problem in javascript can prevent much of the code to run, this line:

default: 'I don\'t know!';

you should return i don't know. You forgot the return keyword


#3

at the very end, call your function to get a result:

console.log(getReview("The Lion King"));

also, movieInfo.name[3] doesn't exist. The items in array at index 0,1 and 2. No 3. I guess you meant movieInfo.name[2]?