Skip to content

Commit 8655d17

Browse files
committed
last dot index fixed
1 parent f214a57 commit 8655d17

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const dir = filePath.slice(0, lastSlashIndex);
2121
console.log(`The dir part of ${filePath} is ${dir}`);
2222

2323
const lastDotIndex = base.lastIndexOf(".");
24-
const ext = base.slice(lastDotIndex + 1);
24+
const ext = base.slice(lastDotIndex);
2525
console.log(`The ext part of ${filePath} is ${ext}`);
2626

2727

0 commit comments

Comments
 (0)