Skip to content

Commit 9be77a5

Browse files
committed
first commit
0 parents  commit 9be77a5

File tree

7 files changed

+107
-0
lines changed

7 files changed

+107
-0
lines changed

00-Introduction/template/app.js

Whitespace-only changes.

00-Introduction/template/index.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Learning JavaScript - Walker</title>
6+
<link rel="stylesheet" href="style.css">
7+
</head>
8+
<body>
9+
10+
<script src="app.js"></script>
11+
</body>
12+
</html>

00-Introduction/template/style.css

Whitespace-only changes.

01-Basics/01-varNfunc/app.js

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
/*/////
2+
Part 1
3+
/////*/
4+
5+
// Step 0
6+
// alert('Hello Wolrd');
7+
console.log('Hello Wolrd');
8+
/*
9+
Long
10+
Comments
11+
*/
12+
13+
// Step 1
14+
15+
console.log('hello Mr. John');
16+
console.log('hello Mr. Mike');
17+
18+
19+
// Step 2
20+
21+
let name;
22+
23+
name = 'John';
24+
console.log('hello Mr. ' + name);
25+
26+
name = 'Mike';
27+
console.log('hello Mr. ' + name);
28+
29+
30+
// Step 3
31+
32+
name = 'John';
33+
console.log('Hello, Mr. ' + name); // correction
34+
35+
name = 'Mike';
36+
console.log('Hello, Mr. ' + name); // correction
37+
38+
39+
// Step 4
40+
41+
sayHello('John');
42+
sayHello('Mike');
43+
44+
function sayHello(n){
45+
console.log('Hello, Mr. ' + n);
46+
}
47+
48+
49+
50+
/*/////
51+
Part 2
52+
Let's understand more about JavaScritp variables.
53+
/////*/
54+
55+
/*
56+
Primitive Types:
57+
- Numer = 3 / 3.14
58+
- Boolean = true/false
59+
- String = 'Hello', '3', '3.14'
60+
- null
61+
- undefined
62+
- Symbol(new in ES6)
63+
*/
64+
65+
66+
console.log('11' - 2); // returns 30, Number
67+
console.log('11' + 2); // returns "112", String
68+
console.log(+'11' + 2); // returns 13, Number
69+
console.log('11' + true); // returns 11true, String
70+
console.log('11' - true); // returns 10, Number
71+
72+
console.log(11 + 2); // returns 13, Number
73+
console.log(11 + '2'); // returns 112, String
74+
console.log(11 + +'2'); // returns 13, String
75+
console.log(11 - 2); // returns -2, Number
76+
console.log(11 - '2'); // returns -2, Number
77+
console.log(11 - 'x'); // returns NaN, Number
78+
79+
console.log('11' + 'x'); // returns 11x, String
80+
console.log('11' - 'x'); // returns NaN, Number
81+
82+
83+

01-Basics/01-varNfunc/index.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Learning JavaScript - Walker</title>
6+
<link rel="stylesheet" href="style.css">
7+
</head>
8+
<body>
9+
10+
<script src="app.js"></script>
11+
</body>
12+
</html>

01-Basics/01-varNfunc/style.css

Whitespace-only changes.

readme.md

Whitespace-only changes.

0 commit comments

Comments
 (0)