Skip to Main Content
JavaScript Absolute Beginner's Guide, 2nd Edition
book

JavaScript Absolute Beginner's Guide, 2nd Edition

by Kirupa Chinnathambi
December 2019
Beginner content levelBeginner
464 pages
10h 31m
English
Que
Content preview from JavaScript Absolute Beginner's Guide, 2nd Edition

6. Commenting Your Code...FTW!

In This Chapter

  • Learn how to comment your code

  • Figure out the best practices around commenting

Everything we write in our code editor might seem like it is intended for our browser’s eyes only:

let xPos = -500;

function boringComputerStuff() {
  xPos += 5;

  if (xPos > 1000) {
    xPos = -500;
  }
}
boringComputerStuff();

As we will soon find out, that isn’t the case. There is another audience for our code. That audience is made up of human beings.

Our code is often used or scrutinized by other people. This is especially true if you and I are working in a team with other JavaScript developers. We’ll often be looking at their code, and they’ll often be looking at our code. To make all ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

JavaScript Absolute Beginner’s Guide

JavaScript Absolute Beginner’s Guide

Kirupa Chinnathambi

Publisher Resources

ISBN: 9780136204213