There was an error while loading. Please reload this page.
1 parent 468c61b commit d725fb3Copy full SHA for d725fb3
1 file changed
Sprint-2/1-key-exercises/3-paths.js
@@ -18,7 +18,7 @@ console.log(`The base part of ${filePath} is ${base}`);
18
// Create a variable to store the ext part of the variable
19
20
const dir = filePath.slice(0, lastSlashIndex);
21
-const ext = filePath.slice(filePath.lastIndex("."));
+const ext = filePath.slice(filePath.lastIndexOf("."));
22
23
console.log(dir);
24
console.log(ext);
0 commit comments