From the course: Learning the JavaScript Language
Unlock the full course today
Join today to access over 24,400 courses taught by industry experts.
Readability: Comments - JavaScript Tutorial
From the course: Learning the JavaScript Language
Readability: Comments
- [Instructor] In this video, we're going to talk about comments which are used for documenting and for disabling execution of parts of your code. The most important function for comments is documentation, that is, adding pieces of code that don't execute, but can be read by other human beings or by yourself to understand what's going on in your program. These come in two styles in JavaScript, line comments and block comments. The first is the line comment. We can see that on the first line of this file, it starts with two slash characters and anything after those on the same line doesn't execute. These need to be immediately following one another. No spaces in between or anything like that. Just two slashes. And they can be at the beginning of the line or anywhere else. So in this case, I have one that's at the beginning of the line, and then this one down here is at the end of the line. This particular one will…
Contents
-
-
-
-
-
Objects4m 13s
-
(Locked)
Using objects for data modeling2m 33s
-
(Locked)
Manipulating objects4m 24s
-
(Locked)
Jargon: References4m 39s
-
(Locked)
Arrays5m 35s
-
(Locked)
Manipulating arrays7m 36s
-
(Locked)
Readability: Whitespace3m 24s
-
(Locked)
Readability: Comments4m 57s
-
(Locked)
Regular expressions6m 9s
-
-
-
-
-
-