by JoeBot3000 · 5y ago · 0 comments
I think this is the point, the second one scales worse - absolutely (ignoring the bug you mentioned) however it really is more readable, and because V8 is so fast, why not use the second version?
Block comments and function names are important, but if someone needs to modify the code to add or change functionality nothing beats simple & readable code.
In some cases, there are persuasive arguments to favor readability over performance, but I don't find this particular example very convincing.