There was an error while loading. Please reload this page.
1 parent 1e39939 commit d6958a1Copy full SHA for d6958a1
1 file changed
Sprint-2/1-key-exercises/3-paths.js
@@ -16,8 +16,10 @@ console.log(`The base part of ${filePath} is ${base}`);
16
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
+const dir = filePath.slice(0, lastSlashIndex);
20
+console.log(`The direction of the file is ${dir}`);
21
+const ext = filePath.slice(filePath.lastIndexOf(".") + 1);
22
+console.log(`The extenction of the file is ${ext}`);
23
-const dir = ;
-const ext = ;
24
-// https://www.google.com/search?q=slice+mdn
25
+// https://www.google.com/search?q=slice+mdn
0 commit comments