Skip to content

Instantly share code, notes, and snippets.

@katepapineni
Last active August 7, 2020 15:14
Show Gist options
  • Save katepapineni/17fccce802460e17210bb55d4497a53e to your computer and use it in GitHub Desktop.
Save katepapineni/17fccce802460e17210bb55d4497a53e to your computer and use it in GitHub Desktop.
const rFunc = n => (n === 0 ? 1 : n * rFunc(n - 1));
// What's the ouput? What's the base case?
console.log(rFunc(4));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment