JavaScript: Fudged up a CodeCademy tutorial
<p>I'm working on a JavaScript tutorial at codecademy.com</p>

<p>It starts by giving you the following outline for a function</p>

<pre><code>var getReview = function (movie) {

};
</code></pre>

<p>Then it gives you a list of movies, and it tells you to write a function so that it returns a review for a movie based on whatever movie was passed in as a parameter. The question also suggests that you use a switch statement.  Below is what I came up with but it's not the correct answer. Codecademy doesn't unfortunately reveal the answer.  I thought it was weird to put a switch statement in a function, but that's what it said had to be done. </p>

<p>Can anyone explain what I did wrong?</p>

<pre><code>var getReview = function(movie) {

var result;

switch (movie) {

  case "Matrix":
    result = "good trip out";
    break;

  case "Princess Bride":
    result = "awesome date night movie";  
    break;

  case "Welcome to America":
    result = "Amjad's favorite";
    break;

    case "Remember the Titans":
    result = "love the sports";
    break; 

    case "Why do I look like I'm 12?":
    result = "The Ryan and Zach story"
    break; 

    case "Fighting Kangaroos in the wild";
    result = "Token Australian movie for Leng"
    break; 

    default:
    result = "I don't know";
}

return result; 
};
</code></pre>
