title: Javascript; function (x,y,z), confused on how values are passed
body: <p>I searched and read about functions to no extent. I have seen my questions answered, but not in the detail I have understood. I'm less than one year into programming.
  Okay, so I don't understand how the r,c,or the e get values.
  How does Javascript know what to use "r" and "c" for when the code is later called. How does the "e" end up in the final function?
  Maybe I'm shooting too high trying to understand this, but maybe not. Thanks</p>
  
  <pre><code>game.makeKeydown = function (r, c) {
      return function (e) {
          return game.onKeydown(e, r, c);
      };
  };
  </code></pre>