There was an error while loading. Please reload this page.
1 parent 0cad20d commit 14ba89dCopy full SHA for 14ba89d
1 file changed
Sprint-2/1-key-exercises/3-paths.js
@@ -15,9 +15,13 @@ const base = filePath.slice(lastSlashIndex + 1);
15
console.log(`The base part of ${filePath} is ${base}`);
16
17
// Create a variable to store the dir part of the filePath variable
18
+const dir = filePath.slice(0, lastSlashIndex + 1);
19
+
20
// Create a variable to store the ext part of the variable
21
+const lastDotIndex = filePath.lastIndexOf(".");
22
+const ext = filePath.slice(lastDotIndex + 1);
23
-const dir = ;
-const ext = ;
24
+// console.log(dir);
25
+// console.log(ext);
26
27
// https://www.google.com/search?q=slice+mdn
0 commit comments