I have to celebrate you baby? alternative method to Switch


#1



#2

I have a similar question. Below is my code - the console returns "SyntaxError: Unexpected identifier". What's wrong with it?

var getReview = function (movie) {
for (var title in movie) {
return (movie[review]);
}
};
var movie = {
movie1 = {
title: "Toy Story 2",
review: "Great story. Mean prospector."
}
movie2 = {
title: "Finding Nemo",
review: "Cool animation, and funny turtles."
}
movie3 = {
title: "The Lion King",
review: "Great songs."
}
};

getReview(movie);


#3

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