File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,3 +5,6 @@ count = count + 1;
55
66// Line 1 is a variable declaration, creating the count variable with an initial value of 0
77// Describe what line 3 is doing, in particular focus on what = is doing
8+ In line 3 , the new item adds 1 to turn count into a new value .
9+
10+ 1 adds into an old value and update its own value , it becomes a new value now .
Original file line number Diff line number Diff line change @@ -18,8 +18,19 @@ console.log(`The base part of ${filePath} is ${base}`);
1818
1919const dir = filePath . slice ( 0 , lastSlashIndex ) ;
2020
21- // Create a variable to store the dir part of the filePath variable
21+ // Create a variable to store the dir part of the filePath
22+ const ext = filePath . slice ( filePath . lastIndexOf ( "." ) + 1 ) ;
23+
2224// Create a variable to store the ext part of the variable
2325
2426
25- // https://www.google.com/search?q=slice+mdn
27+ // https://www.google.com/search?q=slice+mdn
28+
29+
30+
31+
32+
33+
34+
35+
36+
Original file line number Diff line number Diff line change 11// trying to create an age variable and then reassign the value by 1
2- function X ( num ) {
3- const age = num + 1 ;
4- return age ; }
5- console . log ( X ( 33 ) ) ;
2+
3+ let age = 0 ; // Initialize the age variable
4+ age = age + 1 ; // Reassign the value by 1
5+ console . log ( age ) ;
6+
7+
You can’t perform that action at this time.
0 commit comments