You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: page/javascript-101/syntax-basics.md
+12-8
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,8 @@ github: jquery
8
8
9
9
JavaScript has support for single and multi line comments. Comments are ignored by the JavaScript engine, therefore have no side-effects on the outcome of the program. They should be used to document the code for future developers (including yourself!). There are libraries available that can generate project documentation pages based on commenting conventions used, [JSDoc](http://code.google.com/p/jsdoc-toolkit/,"JSDoc Toolkit") is one of the more popular ones.
10
10
11
-
<javascriptcaption="Single and multi line comments.">
11
+
```js
12
+
// Single and multi line comments.
12
13
// this is an example of a single line comment.
13
14
14
15
/*
@@ -17,18 +18,20 @@ JavaScript has support for single and multi line comments. Comments are ignored
17
18
* multi line
18
19
* comment.
19
20
*/
20
-
</javascript>
21
+
```
21
22
22
23
### Whitespace
23
24
24
25
Whitespace is also ignored in JavaScript. There are many tools that will actully strip out all the whitespace in a program reducing the overall file size in order to improve network latency. Given the availability of tools like these, whitespace should be leveraged to make the code as readible as possible.
25
26
26
-
<javascriptcaption="Whitespace is insignifigant.">
0 commit comments