Today I’m going to teach a lesson that I’ve taught in the past, but hopefully in a more comprehensive manner: a relatively advanced concept called recursion. Also, I will build something from scratch, which will allow you to learn about other concept covered before.
Here are some resources to learn about recursion:
- Code Monster’s Recursion lesson:
http://www.crunchzilla.com/code-monster (Section 35)
- Khan Academy’s lesson on Recursion: https://www.khanacademy.org/computing/computer-science/algorithms/recursive-algorithms/a/recursion
And here’s today’s assignment:
answer key is here: http://jsfiddle.net/zeroth_hour/L47kfs17/