In a JavaScript file I saw:

function Somefunction(){
   var that = this; 
   ... 
}

What is the purpose of declaring that and assigning this this to it?

6 Answers
6

Leave a Reply

Your email address will not be published. Required fields are marked *