We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 634a2d8 commit 71349b9Copy full SHA for 71349b9
Sprint-1/1-key-exercises/3-paths.js
@@ -18,6 +18,11 @@ 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(dotIndex)
+const ext = base.slice(base.lastIndexOf("."));
22
+
23
24
+console.log(filePath, dir);
25
+console.log(filePath, ext);
26
27
28
// https://www.google.com/search?q=slice+mdn
0 commit comments