File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed
Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,6 @@ console.log(count);
77// Describe what line 3 is doing, in particular focus on what = is doing
88
99// Line 3 is reassigning the value of the count variable to the result of the expression count + 1.
10- // The = operator is the assignment operator, which assigns the value on the right-hand side
11- // (the result of count + 1) to the variable on the left-hand side (count).
12- // This increments the value of count by 1.
10+ // The = operator is the assignment operator, which assigns the value on the right-hand side
11+ // (the result of count + 1) to the variable on the left-hand side (count).
12+ // This increments the value of count by 1.
Original file line number Diff line number Diff line change @@ -10,4 +10,3 @@ let initials = `${firstName[0]}${middleName[0]}${lastName[0]}`;
1010console . log ( initials ) ;
1111
1212// https://www.google.com/search?q=get+first+character+of+string+mdn
13-
Original file line number Diff line number Diff line change @@ -17,7 +17,10 @@ console.log(`The base part of ${filePath} is ${base}`);
1717// Create a variable to store the dir part of the filePath variable
1818// Create a variable to store the ext part of the variable
1919
20- const dir = ;
21- const ext = ;
20+ const dir = filePath . slice ( 0 , lastSlashIndex ) ;
21+ console . log ( `the dir part of ${ filePath } is ${ dir } ` ) ;
2222
23- // https://www.google.com/search?q=slice+mdn
23+ const ext = filePath . slice ( filePath . lastIndexOf ( "." ) ) ;
24+ console . log ( `the ext part of ${ filePath } is ${ ext } ` ) ;
25+
26+ // https://www.google.com/search?q=slice+mdn
You can’t perform that action at this time.
0 commit comments