Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joehakimrahme/787a24a148d3066c432e753aa6255c60 to your computer and use it in GitHub Desktop.
Save joehakimrahme/787a24a148d3066c432e753aa6255c60 to your computer and use it in GitHub Desktop.
// Write a function that prints the n first even numbers starting with 0
function printPilou(y) {
function partialPilou(n, i) {
if (n == 0) {
return
}
console.log(i);
partialPilou(n-1, i+2);
}
partialPilou(y, 0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment