There was an error while loading. Please reload this page.
1 parent 3ea71eb commit 83b9be5Copy full SHA for 83b9be5
1 file changed
Sprint-2/1-key-exercises/3-paths.js
@@ -17,8 +17,8 @@ console.log(`The base part of ${filePath} is ${base}`);
17
// Create a variable to store the dir part of the filePath variable
18
// Create a variable to store the ext part of the variable
19
20
-const dir = filePath.slice(0, filePath.indexOf(base));
+const dir = filePath.slice(1, filePath.indexOf(base));
21
const ext = filePath.slice(-(filePath.length - filePath.indexOf(".")));
22
-console.log(ext);
+console.log(dir);
23
24
// https://www.google.com/search?q=slice+mdn
0 commit comments