Created
May 31, 2020 10:39
-
-
Save joehakimrahme/787a24a148d3066c432e753aa6255c60 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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