Created
March 26, 2016 14:30
-
-
Save drakvuf/72de4c6de19f18eacc12 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 add = function(x) { | |
return function(y) { | |
return x + y; | |
}; | |
}; | |
var increment = add(1); | |
var addTen = add(10); | |
increment(2); | |
// 3 | |
addTen(2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment