Event Handling and Recursion sample!

Demo: https://suspicious-minsky-39ebea.netlify.com/
Source: https://github.com/tpkahlon/javascript30/tree/master/js30-19

Feel free to tweak code to play with these concepts.