Category: antipatterns

15 Ways to Write Self-documenting JavaScript

Isn’t it fun to find a comment in code that’s completely out of place and useless? It’s an easy mistake to make: you change some code, and forget to remove or update the comment. A bad comment won’t break your code, but imagine what would happen when debugging. You read the comment. It says one...