Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// 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