Skip to content

Commit 93fae64

Browse files
committed
update: add comment to ext extraction logic for clarity
1 parent affd78a commit 93fae64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sprint-1/1-key-exercises/3-paths.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ filePath
2727
.pop();
2828
// Create a variable to store the ext part of the variable
2929

30-
const ext=base.slice(base.lastIndexOf(".") + 1);
30+
const ext=base.slice(base.lastIndexOf(".") + 1); // The code uses the lastIndexOf method to find the position of the last dot in the base variable.
3131
console.log(`The ext part of ${filePath} is ${ext}`);

0 commit comments

Comments
 (0)