|
1 | | -When you write programs, it is sometimes useful to write comments, so you, or anyone reading the program, can understand it better. |
2 | | - |
3 | | -The comments are completely ignored by the program interpreter in the computer, so you can write anything on the comments and it will never cause any error. |
4 | | - |
5 | 1 | # Code Comments
|
6 | 2 |
|
7 | 3 | ---
|
8 | 4 |
|
| 5 | +When you write programs, it is sometimes useful to write comments, so you, or anyone reading the program, can understand it better. |
| 6 | + |
| 7 | +The comments are completely ignored by the program interpreter in the computer, so you can write anything on the comments and it will never cause any error. |
| 8 | + |
9 | 9 | In Javascript there are two types of comments: line comments and block comments.
|
10 | 10 |
|
11 | 11 | A line comment starts when the program reaches the two forward slashes in sequence. This informs the computer that whatever follows those slashes in that line is a comment and should not be considered program instructions. For example:
|
|
0 commit comments