Skip to content

Instantly share code, notes, and snippets.

@anubhavsrivastava
Last active February 3, 2019 11:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anubhavsrivastava/9baa61b12abe8d8a952f762f886e477b to your computer and use it in GitHub Desktop.
Save anubhavsrivastava/9baa61b12abe8d8a952f762f886e477b to your computer and use it in GitHub Desktop.
Currying Add(2)(3) in JS
function add(x){
return function (y){
return x+y;
}
}
//ES6 version using arrow functions
const add = x=> y=>x+y;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment