Skip to content

Commit 32ba325

Browse files
Make change to fit with dir part
1 parent fd5b31a commit 32ba325

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@ 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-
21-
let dirDirectory = filePath.slice(filePath.indexOf("/"),filePath.lastIndexOf("."));
20+
let dirDirectory = filePath.slice(filePath.indexOf("Users"),filePath.lastIndexOf("/"));
2221
let extDirectory = filePath.slice(filePath.lastIndexOf("."));
23-
let baseDirectory = filePath.slice(filePath.lastIndexOf("/"));
2422
console.log(`The dir part of the file is ${dirDirectory}.`);
2523
console.log(`The ext part of the file is ${extDirectory}.`);
26-
console.log(`The base part of the file is ${baseDirectory}.`);
24+
2725
// https://www.google.com/search?q=slice+mdn

0 commit comments

Comments
 (0)