Skip to content

Commit e9bd9bb

Browse files
authored
answered 1.3
1 parent 65263bd commit e9bd9bb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@ console.log(`The base part of ${filePath} is ${base}`);
1616

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
19+
const dir = filePath.slice(0, lastSlashIndex);
20+
const ext = base.slice(base.lastIndexOf("."));
21+
22+
console.log(`The dir part of ${filePath} is ${dir}`)
23+
console.log(`The ext part of ${filePath} is ${ext}`)
1924

20-
const dir = ;
21-
const ext = ;
2225

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

0 commit comments

Comments
 (0)