Created
April 3, 2014 18:18
-
-
Save kwyn/9959818 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var applyResult = 0; | |
var callResult = 0; | |
var sum = function(a, b, c){ | |
return a + b + c; | |
}; | |
applyResult = sum.apply(null, [1,2,3]); // returns 6 | |
callResult = sum.call(null, 1, 2, 3); //also returns 6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment