title: Javascript closures function parameters?
body: <p>Code belongs to javascriptissexy.com
  My question is why invoking mjName ("Jackson") returns "This celebrity is Michael Jackson"?
  Is it that second parameter given in ANY outer function always, says to js = inner function parameter? 
  Could someone explain the whole concept in great detail?</p>
  
  <pre><code>function celebrityName (firstName) {
      var nameIntro = "This celebrity is ";
  // this inner function has access to the outer function's variables, including the parameter
      function lastName (theLastName) {
          return nameIntro + firstName + " " + theLastName;
      }
      return lastName;
  }
  
  var mjName = celebrityName ("Michael");
      // At this juncture, the celebrityName outer function has returned.
  
  // The closure (lastName) is called here after the outer function has returned above
  // Yet, the closure still has access to the outer function's variables and parameter
  mjName ("Jackson"); // This celebrity is Michael Jackson
  </code></pre>