GeezerVison is showing github.com — Fix typos in basics/comments.md · guptag-dev/javascript@01aac53
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: basics/comments.md +6-4Lines changed: 6 additions & 4 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | # Comments |
2 | 2 |
|
3 | | -Comments are statements that will not be executed by the interpreter, comments are used to mark anotations for others programmers or to make it easy to understand your code in the future. |
| 3 | +Comments are statements that will not be executed by the interpreter, comments are used to mark anotations for others programmers or small descriptions of what your code does, thus making it easier for others to understand what your code does. |
4 | 4 |
|
5 | 5 | In Javascript, comments can be written in 2 different ways: |
6 | 6 |
|
@@ -11,11 +11,11 @@ In Javascript, comments can be written in 2 different ways: |
11 | 11 | var a = "this is a variable defined in a statement"; |
12 | 12 | ``` |
13 | 13 |
|
14 | | -* Section of code starting by `/*`and finishing by `*/`, this method is used for multi-lines comments: |
| 14 | +* Section of code starting with `/*`and ending with `*/`, this method is used for multi-line comments: |
15 | 15 |
|
16 | 16 | ```javascript |
17 | 17 | /* |
18 | | -This is a multi-lines comment, |
| 18 | +This is a multi-line comment, |
19 | 19 | it will be ignored by the interpreter |
20 | 20 | */ |
21 | 21 | var a = "this is a variable defined in a statement"; |
@@ -24,11 +24,13 @@ var a = "this is a variable defined in a statement"; |
24 | 24 |
|
25 | 25 | --- |
26 | 26 |
|
27 | | -Mark the all editor content as a comment |
| 27 | +Mark the editor's contents as a comment |
28 | 28 |
|
29 | 29 | ```js |
| 30 | + |
30 | 31 | Mark me as a comment |
31 | 32 | or I'll throw an error |
| 33 | +
|
32 | 34 | ``` |
33 | 35 |
|
34 | 36 | ```js |
|