Skip to content

Commit 2d4afb5

Browse files
Add comments rules
1 parent 3166301 commit 2d4afb5

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

manual/en-US/coding-standards/chapters/javascript.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,26 @@ if ( test ) {
397397
398398
## Comments
399399
400-
// TODO
400+
**Single Line**
401+
402+
- Place above the code it refers to.
403+
- A space between double forward slashes and comment text.
404+
405+
`// I am a single line comment.`
406+
407+
**Multiline**
408+
409+
- Place above the code it refers to.
410+
- Opening token placed on the line above first comment line, closing placed below last comment line.
411+
- Each comment line begins with two astericks followed by a space.
412+
413+
```
414+
/*
415+
** I am a multiline comment.
416+
** Line two
417+
** Line three
418+
*/
419+
```
401420
402421
---
403422
@@ -408,7 +427,6 @@ if ( test ) {
408427
- Switch Statements
409428
- Equality Operators
410429
- Events
411-
- Comments
412430
- Add jQuery examples
413431
- Double check accuracy of all examples
414432
**With help from:**

0 commit comments

Comments
 (0)