JS-Recursion
Recursion
When a fnuction calls itself until it doesn't. Duh!
code
let countDownFrom = (num) => {
if (num === 0) return;
countDownFrom(num - 1);
};
countDownFrom(10);
When a fnuction calls itself until it doesn't. Duh!
let countDownFrom = (num) => {
if (num === 0) return;
countDownFrom(num - 1);
};
countDownFrom(10);