Skip to content

Commit 824e68a

Browse files
committed
feat: add operators and data types
1 parent 6a8059d commit 824e68a

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>Document</title>
8+
</head>
9+
10+
<body>
11+
12+
<script src="script.js"></script>
13+
</body>
14+
15+
</html>

02-operators-and-data-types/script.js

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
//1
2+
console.log("A" + "l" + "e" + "x" + "a" + "n" + "d" + "e" + "r");
3+
4+
//2
5+
6+
// Error! Make it work
7+
console.log("Hallo");
8+
9+
// Error! Make it work
10+
console.log('That doesn"t work');
11+
12+
// should return true. Change only the operator to fix it.
13+
console.log(50 + 2 === 52);
14+
15+
// should be false. Change only the operator to fix it.
16+
console.log("333" === 333);
17+
18+
// Wrong result: Expected 555 not 855. Change only the operator to fix it.
19+
console.log((600 + 510) / 2);
20+
21+
// Wrong result: Expected a Number 4 received 22
22+
console.log(2 + 2);
23+
24+
//3 compare two conditions
25+
26+
console.log(25 / 5); // Result: 5
27+
console.log(50 / 10); // Result: 5
28+
29+
console.log(25 / 5 === 5 && 50 / 10 === 5);

0 commit comments

Comments
 (0)