DEV Community

Discussion on: Clean Code Applied to JavaScript — Part IV. Comments

Collapse
 
fly profile image
joon • Edited

I agree with all the points, except the part that states that comments should only be used when there is 'business level complexity'.
Don't get me wrong - I'm not advocating using comments to the point of the example - that definitely should be avoided at all costs. But it also seems like a rather extreme case.

Personally I add comments to code like javascript one-liners that are almost equivalent to machine code when it comes to readability, or functions that seem simple but have more use-cases than meet the eye.

Just adding my thoughts to the topic :)