function add(number) {
return function(nextNumber) {
if (nextNumber === undefined) {
return number;
}
return add(number + nextNumber);
}
}
Created
October 12, 2022 12:51
-
-
Save eynopv/1d114ab92516045362008613955e8cca to your computer and use it in GitHub Desktop.
My embarrassing moment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment