Reputation: 4392
I guess this have been both asked and answered before, but I don't really know what to search for.
Anyway, lets say we've got the following JavaScript:
var foo = {
myVar : 'Hello',
bar : function() {
//Fetch the myVar variable
}
}
How do I access the variable where mentioned?
Thank you in advance!
Upvotes: 0
Views: 150