The Art of JavaScript Code Comments

Commenting JavaScript code is a more nuanced thing than we give it credit for. There are a couple of schools of thought on this. One states that if you feel a comment is necessary, you should rewrite it to be more legible. This is true. But it is also not true. In the process of writing a comment, you can often find things that could be written better, but it is not an either/or, for the following reason: JavaScript code can describe how, but it cannot explain why. There is just not one right way or one reason to write a comment. This session will dig into some of the many beneficial types of comments that might all serve a different purpose, followed by patterns we might want to avoid. In the process we will talk about being good teammates, collaborating, and writing the most legible JavaScript code we can.

Video producer: https://www.jsconfhi.com/