title: Returning a function Chrome Dev tools
body: <p>This question may be answered elsewhere but I wasn't even sure how to begin searching for the answer. I'm new to JavaScript so this one is a struggle for me to understand.</p>
  
  <p>Given the following code:</p>
  
  <pre><code>function multiple(n) {
      function f(x) {
          return x * n;
      }
      return f;
  }
  var triple = multiple(3);
  var quadruple = multiple(4);
  </code></pre>
  
  <p>When I pass the following into the console:</p>
  
  <pre><code>console.log(triple(5));
  </code></pre>
  
  <p>I get what I expect, that is, 15. Likewise with any number, it will be tripled (or quadrupled if I used the second function).</p>
  
  <p>But when I type triple into the console I get the following code:</p>
  
  <pre><code>f(x) {
      return x * n;
  }
  </code></pre>
  
  <p>Shouldn't the console return...</p>
  
  <pre><code>f(x) {
      return x * 3;
  }
  </code></pre>
  
  <p>...since 3 is coded into the function by virtue of the following code:</p>
  
  <pre><code>var triple = multiple(3);
  </code></pre>