Skip to content

Commit 6ca968b

Browse files
committed
Extract file extension, lastDotIndex defined and clean up debug output
1 parent 1dc171d commit 6ca968b

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,10 @@ console.log(`The base part of ${filePath} is ${base}`);
1818
// Create a variable to store the ext part of the variable
1919

2020
const dir = filePath.slice(0, lastSlashIndex);
21+
console.log(`ABC ${filePath.lastIndexOf(".")}`);
22+
const lastDotIndex = filePath.lastIndexOf(".");
2123
const ext = filePath.slice(lastDotIndex);
22-
// https://www.google.com/search?q=slice+mdn
24+
// https://www.google.com/search?q=slice+mdn
25+
26+
27+

0 commit comments

Comments
 (0)