// I’m not sure how this works, I can assume It’s a recursion which I’m having a hard time with. Please help 🙂
function a(b, c) {
if(b > c) {
a = 0;
} else {
a = b + a(b * 2 + 1, c);
}
return a
}
console.log(a(1, 2018))
Blancer.com Tutorials and projects
Freelance Projects, Design and Programming Tutorials
// I’m not sure how this works, I can assume It’s a recursion which I’m having a hard time with. Please help 🙂
function a(b, c) {
if(b > c) {
a = 0;
} else {
a = b + a(b * 2 + 1, c);
}
return a
}
console.log(a(1, 2018))