January 2018
Intermediate to advanced
678 pages
20h 16m
English
In prior chapters, you learned about various coding conventions for HTML and CSS. Earlier in this chapter, you learned a few coding conventions for JavaScript, such as needing to use descriptive variable names. In this section, you’ll get a deeper immersion into JavaScript coding conventions. Remember—it’s important to follow coding conventions so your code is understandable, robust, and easy to maintain.
Let’s start with a very important coding convention—use appropriate comments. JavaScript has two types of comments: one type for short comments and one type for longer comments. The syntax for short comments is simply two forward slashes (//) at the left of the descriptive text. Here’s an example: ...
Read now
Unlock full access