Sunday, 17 April 2016

What is the Difference between javascript apply() method and call() method

I have been using JavaScript Apply() method to Pass a callback function to a function as :



fun.apply(thisArg, [argsArray]);



Now i found the Call() method and am trying to understand what is the difference , is it just the wey i pass on the arguments?!!



fun.call(thisArg[, arg1[, arg2[, ...]]]) 


What is the difference between them

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...