Skip to content

Commit d725fb3

Browse files
committed
fixed a bug
1 parent 468c61b commit d725fb3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ 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-
const ext = filePath.slice(filePath.lastIndex("."));
21+
const ext = filePath.slice(filePath.lastIndexOf("."));
2222

2323
console.log(dir);
2424
console.log(ext);

0 commit comments

Comments
 (0)