javascript function object method
<p>Hey im new to javascript and i stumbled upon this code in javascript. I dont understand how can be methods increment and print defined inside function. Does that mean that create is an object?</p>

<pre><code> function create() {
     var counter = 0;
     return {
         increment: function () {
             counter++;
         },
         print: function () {
             console.log(counter);
         }
     }
 }
 var c = create();
 c.increment();
 c.print(); // 1
</code></pre>
