In a JavaScript file I saw:
function Somefunction(){
var that = this;
...
}
What is the purpose of declaring that
and assigning this
this to it?
In a JavaScript file I saw:
function Somefunction(){
var that = this;
...
}
What is the purpose of declaring that
and assigning this
this to it?