I am trying to understand closure, and playing with the following code.I am expecting the value of i to be same across all the objects,as closure keeps a reference to the variable of outer function.

```
 function Test(){
 var i=10;
 return{
   get:function(){return i;},
   inc:function(){i++;}
   }
 }
var test1= Test();
var test2=Test();
test1.get(); //outputs 10
test1.inc();
test2.get(); //outputs 10, I am expecting it to be 11

```

Is my understanding of closures correct, Am I even creating a closure in this case? I am new to closures, a detailed explanation would be great. Thanks.