I'm new to JS so noob question:
I see functions which define vars inside them:
function functionName(){
this.something = "";
};
If I understand correctly, something
is a local variable? Why is it being defined as this.something = ''
as opposed to var something = ''
?
Is there any difference, and if so what is it?