Skip to content

Commit 2e11643

Browse files
Markus Amalthea Magnusonajpiano
Markus Amalthea Magnuson
authored andcommitted
Various small fixes on the JavaScript 101 Syntax Basics page. Fixes jquery#347.
1 parent 2889572 commit 2e11643

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

page/javascript-101/syntax-basics.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ attribution:
88

99
### Comments
1010

11-
JavaScript has support for single- and multi-line comments. Comments are ignored by the JavaScript engine and therefore have no side-effects on the outcome of the program. Use comments to document the code for other developers. Libraries like [JSDoc](http://code.google.com/p/jsdoc-toolkit/ "JSDoc Toolkit") are available to help generate project documentation pages based on commenting conventions.
11+
JavaScript has support for single- and multi-line comments. Comments are ignored by the JavaScript engine and therefore have no side-effects on the outcome of the program. Use comments to document the code for other developers. Libraries like [JSDoc](https://code.google.com/p/jsdoc-toolkit/ "JSDoc Toolkit") are available to help generate project documentation pages based on commenting conventions.
1212

1313
```
14-
// Single and multi line comments.
14+
// Single- and multi-line comments.
1515
16-
// This is an example of a single line comment.
16+
// This is an example of a single-line comment.
1717
1818
/*
1919
* this is an example
2020
* of a
21-
* multi line
21+
* multi-line
2222
* comment.
2323
*/
2424
```
@@ -38,11 +38,11 @@ var world = "World!";
3838
// Readable code is good!
3939
var foo = function() {
4040
41-
for ( var i = 0; i < 10; i++ ) {
41+
for ( var i = 0; i < 10; i++ ) {
4242
43-
alert( i );
43+
alert( i );
4444
45-
}
45+
}
4646
4747
};
4848
@@ -75,17 +75,17 @@ var $my_AwesomeVariable = "d";
7575
var _my_awesome_variable_$ = "e";
7676
```
7777

78-
### Variable definition
78+
### Variable Definition
7979

80-
Variables can be defined using multiple `var` statements, or in a single combined var statement.
80+
Variables can be defined using multiple `var` statements, or in a single combined `var` statement.
8181

8282
```
83-
// this works
83+
// This works:
8484
var test = 1;
8585
var test2 = function() { ... };
8686
var test3 = test2( test );
8787
88-
// and so does this
88+
// And so does this:
8989
var test4 = 1,
9090
test5 = function() { ... },
9191
test6 = test2( test );

0 commit comments

Comments
 (0)