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 Academy’s Recursion lesson: http://www.codecademy.com/courses/javascript-lesson-205/0/1 and http://www.codecademy.com/courses/javascript-lesson-149/0/1
- 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/