Skip to content

Commit a4dbb5a

Browse files
authored
Update 3-paths.js
1 parent 35a1a97 commit a4dbb5a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ console.log(`The base part of ${filePath} is ${base}`);
1818
// Create a variable to store the ext part of the variable
1919

2020
const dir = filePath.slice(0, lastSlashIndex);
21-
const ext = filePath.slice(lastDotIndex);
21+
console.log(`The dir part of ${filePath} is ${dir}`);
22+
23+
const ext = filePath.slice(lastDotIndex + 1);
24+
console.log(`The ext part of ${filePath} is ${ext}`);
2225

2326

2427

0 commit comments

Comments
 (0)