title: Why does my inner function cause an "Uncaught TypeError: countMe.Increment is not a function" in plain javascript?
body: <p>I'm trying to learn closures with plain javascript by following an example, which I've typed below.  However, I'm getting an error, "Uncaught TypeError: countMe.Increment is not a function".</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function enclosedFunction(){
    var counter = 0;
    var Increment = function(){
      counter ++;
      console.log(counter);
      }
    return(Increment);
  }
  
  var countMe = enclosedFunction();
  console.log("Count Me: ");
  countMe.Increment();</code></pre>
  </div>
  </div>
  </p>
  
  <p>Why does this happen?</p>