File tree 3 files changed +43
-2
lines changed
3 files changed +43
-2
lines changed Original file line number Diff line number Diff line change
1
+ let x ;
2
+
3
+ // 1. Arithmetic
4
+
5
+ x = 5 + 5 ; // addition - 10
6
+
7
+ x = 5 - 5 ; // subtraction - 0
8
+
9
+ x = 5 * 5 ; // multiplication - 25
10
+
11
+ x = 5 / 5 ; // division - 1
12
+
13
+ x = 10 % 3 ; // operand - handles remainder 1
14
+
15
+ // 2. Concatenation - joining of two or more data type mostly string, we use the addition operator to concatenate
16
+
17
+ x = "Hello" + " " + "World" ; // Hello World
18
+
19
+ // 3. Exponential
20
+
21
+ x = 4 ** 4 ; // 4 raise to power 4 = 235
22
+
23
+ x = 3 ** 3 ; // 27
24
+
25
+ console . log ( x ) ;
Original file line number Diff line number Diff line change
1
+ // type-conversion involves converting a data type to another, e.g number to string vice versa, etc
2
+
3
+ // NUMBER to STRING
4
+ let x = 100 ;
5
+
6
+ // let output = x.toString(); // string
7
+
8
+ // convert from string to number
9
+
10
+ // let output = parseInt(x); // number
11
+
12
+ // convert from
13
+
14
+ console . log ( output , typeof output ) ;
Original file line number Diff line number Diff line change 15
15
body {
16
16
font-family : "Poppins" , sans-serif;
17
17
padding : 0 ;
18
- box-sizing : border-box;
19
18
margin : 0 ;
19
+ box-sizing : border-box;
20
20
}
21
21
</ style >
22
22
</ head >
@@ -35,7 +35,7 @@ <h3 class="text-6xl font-semibold text-black items-center">
35
35
class ="text-white capitalize font-medium font-base active:scale-[0.97] transition-all duration-300 bg-blue-500 w-[100px] py-3.5 rounded "
36
36
onclick ="startTimer() "
37
37
>
38
- Start
38
+ Start/play
39
39
</ button >
40
40
< button
41
41
class ="text-white capitalize font-medium font-base active:scale-[0.97] transition-all duration-300 bg-yellow-500 w-[100px] py-3.5 rounded "
@@ -145,5 +145,7 @@ <h3 class="text-6xl font-semibold text-black items-center">
145
145
// Initial display
146
146
updateTimerDisplay();
147
147
</script>
148
+ <!-- test js file -->
149
+ < script src ="script.js " type ="text/javascript "> </ script >
148
150
</ body >
149
151
</ html >
You can’t perform that action at this time.
0 commit comments