Skip to content

Commit 4eede60

Browse files
committed
Implement dir extraction from filePath and log the result in 3-paths.js
1 parent 15f4a87 commit 4eede60

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +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-
const dir = ;
20+
const dir = filePath.slice(0, lastSlashIndex);
21+
console.log(`The dir part of ${filePath} is ${dir}`);
22+
2123
const ext = ;
2224

2325
// https://www.google.com/search?q=slice+mdn

0 commit comments

Comments
 (0)