Skip to content

Commit cbd2fa5

Browse files
author
Rebecca Murphey
committed
syntax basics md
1 parent a8a473a commit cbd2fa5

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
chapter: "js101"
3+
section: 1
4+
title: "Syntax Basics"
5+
---
6+
Understanding statements, variable naming, whitespace, and other basic JavaScript syntax.
7+
8+
<div class="example" markdown="1">
9+
A simple variable declaration
10+
11+
var foo = 'hello world';
12+
</div>
13+
14+
<div class="example" markdown="1">
15+
Whitespace has no meaning outside of quotation marks
16+
17+
var foo = 'hello world';
18+
</div>
19+
20+
<div class="example" markdown="1">
21+
Parentheses indicate precedence
22+
23+
2 * 3 + 5; // returns 11; multiplication happens first
24+
2 * (3 + 5); // returns 16; addition happens first
25+
</div>
26+
27+
<div class="example" markdown="1">
28+
Tabs enhance readability, but have no special meaning
29+
30+
var foo = function() {
31+
console.log('hello');
32+
};
33+
</div>

0 commit comments

Comments
 (0)