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 559987c commit 59175e7Copy full SHA for 59175e7
Sprint-1/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
-let dirDirectory = filePath.slice(filePath.indexOf("Users"),filePath.lastIndexOf("/"));
21
-let extDirectory = filePath.slice(filePath.lastIndexOf("."));
+const dirDirectory = filePath.slice(1,filePath.lastIndexOf("/"));
+const extDirectory = filePath.slice(filePath.lastIndexOf("."));
22
console.log(`The dir part of the file is ${dirDirectory}.`);
23
console.log(`The ext part of the file is ${extDirectory}.`);
24
0 commit comments