-
Notifications
You must be signed in to change notification settings - Fork 76
/
Copy path03-operators.html
47 lines (41 loc) · 1.09 KB
/
03-operators.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Getting Started with JavaScript</title>
<!-- add bootstrap and css -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- 🔥🔥🔥🔥🔥🔥 start the javascript 🔥🔥🔥🔥🔥🔥 -->
<script>
let a = 10;
let b = 3;
let c = 15;
const d = '5';
let e = 'my name';
const f = 'is chris';
console.group('Addition');
console.log(a + b); // 13
console.log(a + d); // 105
console.log(e + ' ' + f);
console.log(e += ' is the batman');
console.groupEnd();
console.group('Multiplication');
console.log(a * 3); // 30
console.log(a * b); // 30
console.log(b * c); // 45
console.groupEnd();
a++;
b--;
--b;
c += a;
console.group('Incrementing');
console.log(a); // 11
console.log(b); // 1
console.log(c); // 25
console.groupEnd();
</script>
</body>
</html>