Skip to content

Commit de698ca

Browse files
committed
chapter 1: updated code comments
1 parent 1048abe commit de698ca

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

html/chapter01/03-Operators.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,19 @@
11
// @ts-check
22

33
/* Arithmetic operators */
4-
var num = 0;
5-
4+
var num = 0; // {1}
65
console.log('num value is ' + num);
76

87
num = num + 2;
9-
108
console.log('New num value is ' + num);
119

1210
num = num * 3;
13-
1411
console.log('New num value is ' + num);
1512

1613
num = num / 2;
17-
1814
console.log('New num value is ' + num);
1915

2016
num++;
21-
2217
num--;
2318

2419
console.log('New num value is ' + num);

html/chapter01/04-TruthyFalsy.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ testTruthy({}); // true (object is always true)
2222
var obj = { name: 'John' };
2323
testTruthy(obj); // true
2424
testTruthy(obj.name); // true
25-
testTruthy(obj.age); // age (prop does not exist)
25+
testTruthy(obj.age); // age (property does not exist)

0 commit comments

Comments
 (0)