Sunday, April 25, 2010

Declaring variables with this or var?

Programmer Question

What is the difference between declaring a variable with this or var ?



var foo = 'bar'


or



this.foo = 'bar'


When do you use this and when var?



Find the answer here

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails