I'm getting really confused when it comes to javascript object variables. If I'm creating an object constructor, what the difference between using this. and using var? EG:
var myObj = function(x){
this.thing = x;
var otherThing = 20;
var lastThing = "I wish I knew more about javascript objects";
}
The other thing is when setting a this. variable you call it within the object using, in the case above:
this['thing'];
Is that right?
Thanks in advance.