Skip to content

Instantly share code, notes, and snippets.

@JohnMurray
Created July 3, 2020 14:22
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 JohnMurray/8bac01e1198b994be53c2fca941faf97 to your computer and use it in GitHub Desktop.
Save JohnMurray/8bac01e1198b994be53c2fca941faf97 to your computer and use it in GitHub Desktop.
function addX(x) {
return (n) => {
return n + x;
}
}
const addFive = addX(5);
addFive(10);
// returns 15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment