Recursion 1
by Matthew Day
JavaScript
let countDown = (num) => {
if (num === 0) return;
console.log(num);
countDown(num - 1);
}
countDown(10);
// NOTES
// Recursion can be defined simply as a function that calls itself until it stops calling itself.
// Without the "if" statement above, this function would call itself recursively and eventually error out with "Maximum call stack size exceeded."
// SOURCE
// https://www.youtube.com/watch?v=k7-N8R0-KY4