DEV Community

Wisit Phusi
Wisit Phusi

Posted on

How do you commenting your code?

Top comments (1)

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