Javascript lexical scoping
<p>Can someone please explain in plain language how this code works to give a result of 9? </p>

<p>what happens to the return of the inner function? I<code>m assuming that the enclosing function return is assigned to the variables  addTwo and addFive... where does the inner function get its argument (number)? I</code>m totally lost on this and the tutorial doesn`t explain it.</p>

<pre><code>function makeAddFunction(amount) {
  function add(number) {
    return number + amount;
  }
  return add;
}

var addTwo = makeAddFunction(2);
var addFive = makeAddFunction(5);
show(addTwo(1) + addFive(1));
</code></pre>
