Skip to content

Commit 868d352

Browse files
committed
Added LastDotIndex variable
1 parent 775c3f5 commit 868d352

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ console.log(`The base part of ${filePath} is ${base}`);
1919

2020
const dir = filePath.slice(0,lastSlashIndex);
2121
console.log(dir);
22-
const ext = slice();
22+
const LastDotIndex = base.lastIndexOf(".");
23+
const ext = base.slice("/");
2324

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

0 commit comments

Comments
 (0)