Skip to content

Commit 59175e7

Browse files
Fix the dir part of the code to reflect real value
1 parent 559987c commit 59175e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sprint-1/1-key-exercises/3-paths.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ console.log(`The base part of ${filePath} is ${base}`);
1717
// Create a variable to store the dir part of the filePath variable
1818
// Create a variable to store the ext part of the variable
1919

20-
let dirDirectory = filePath.slice(filePath.indexOf("Users"),filePath.lastIndexOf("/"));
21-
let extDirectory = filePath.slice(filePath.lastIndexOf("."));
20+
const dirDirectory = filePath.slice(1,filePath.lastIndexOf("/"));
21+
const extDirectory = filePath.slice(filePath.lastIndexOf("."));
2222
console.log(`The dir part of the file is ${dirDirectory}.`);
2323
console.log(`The ext part of the file is ${extDirectory}.`);
2424

0 commit comments

Comments
 (0)