A process (a function in our case) which calls itself.
It's everywhere: JSON.parse, JSON.stringify
JSON.parse
JSON.stringify
The essential parts of a recursive function => Base Case and Different input
Base Case
Different input
The condition when the recursion ends => this is the most important concept to understand.
CountDown.js
function CountDown(num) { // this is our base case if (num <= 0) { console.log('all done!!!'); return; } console.log(num); num--; CountDown(num); }
There was an error while loading. Please reload this page.