return this.foo("abc",function(){
//do something
});
Can some one tell me what does the above line do?
THanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
this, which might be the DOM Window, a DOM element, or any other JavaScript object depending on how and where the above code is being run.Functionthat//does something.fooon objectthis, passing in two parameters"abc"and said anonymousFunction.Very often when you see code that passes along an anonymous function (e.g.
function(){ ... }), it is in fact holding on to that function in order to execute it not right away but at some later point in time, such as in response to a click event or a timer.