Skip to content

Instantly share code, notes, and snippets.

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