DEV Community

Discussion on: How do you commenting your code?

Collapse
 
joelnet profile image
JavaScript Joel

I take the block of code that requires commenting, break it out to a function. That function name now serves as the description, replacing the need for a comment.

The only comments I leave in are to explain some weirdness, which happens.

'''
// Have to touch the property to make it work
weirdo.prop;
'''