Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
function add(x){
let sum = x;
function resultFn(y){
sum +=y;
return resultFn;
resultFn.valueOf = function(){ return sum };
return resultFn;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment