As we start the last quarter of our Moose Year, I cannot help but wonder; are we going to reach our goals? Thus far, we only have two Lodges that have reached their Application Goal. Congratulati...
Recursion in computer programming is exemplified when a function is defined in terms of simpler, often smaller versions of itself. The solution to the problem is then devised by combining the solutions obtained from the simpler versions of the problem.
Recursion is one of the initial courses we take in every CS university, with the most used example being the Fibonacci sequence: let recursive = (n) => { if(n <= 2) { return 1 } else { return recursive(n - 1) + recursive(n - 2); } }; This works great in most of the languages we've been taught, but with asynchronous environments such as Node.js, things are getting tricky. Using asynchronous functions, we need to wait for the function to end before call the next iteration of the recursion.