GitHub diff of a JavaScript file moving a function out of a function.
My video about placing a well formatted and white spaced function inside Array.forEach() generated a lot of discussion on TikTok. Before most of that discussion I was also adjusting my feelings. Functions should be short. So having an entire function inside of another function is causing a readability problem for the containing function. So I decided to move the function out. However, I still feel that if you have to have a function inside a function it should be fully formatted, commented, and white spaced. However, how often is that really necessary. Move the functions outside the containing function.

Technology, Software Development, and Consulting for Websites

14150 NE 20th Street
Bellevue, WA 98007