Skip to content

Commit f0c63cb

Browse files
committed
added extension variable for file path
1 parent 71e889b commit f0c63cb

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
@@ -15,5 +15,7 @@ const base = filePath.slice(lastSlashIndex + 1); //file.txt
1515
console.log(`The base part of ${filePath} is ${base}`);
1616

1717
const dir = filePath.slice(0, lastSlashIndex);
18-
18+
const ext = base.slice(4);
19+
console.log(dir);
20+
console.log(ext);
1921
// https://www.google.com/search?q=slice+mdn

0 commit comments

Comments
 (0)