title: Returning functions in javascript, understanding scope & closures
body: <p>I was looking at Mozillas developer site on javascript closure and they had this example of code.</p>
  
  <pre><code>  function makeAdder(x){
      return function (y) {
          console.log(y + " this is y")
          console.log(x + " this is x")
          return x + y;
          }
  }
  var add10 = makeAdder(10);
  console.log(add10(2)); // 12
  </code></pre>
  
  <p>Now i understand the X attribute being set but what i dont get is how the scope of the y is being affected. I know its a return function but my brain went to mush trying to visualise how you could set a y when there was no ref to it. could someone explain? </p>