Skip to content

Instantly share code, notes, and snippets.

@anubhavsrivastava
Created February 3, 2019 15:45
Show Gist options
  • Save anubhavsrivastava/6772d1a69d2581d9db2b8b742adb7beb to your computer and use it in GitHub Desktop.
Save anubhavsrivastava/6772d1a69d2581d9db2b8b742adb7beb to your computer and use it in GitHub Desktop.
function add(x){
let sum = x;
return function resultFn(y){
sum +=y;
resultFn.result = sum;
return resultFn;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment