Skip to content

Commit 36dd0c6

Browse files
committed
add at line 6 in the .lastIndexOf() "/"
1 parent 27f9052 commit 36dd0c6

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
@@ -3,7 +3,7 @@ const lastSlashIndex = filePath.lastIndexOf("/");
33
const base = filePath.slice(lastSlashIndex + 1);
44
console.log(`The base part of ${filePath} is ${base}`);
55

6-
const startDirIndex = filePath.lastIndexOf("Users");
6+
const startDirIndex = filePath.lastIndexOf("/Users");
77
const dir = filePath.slice(startDirIndex, lastSlashIndex);
88
console.log(`The dir part of ${filePath} is ${dir}`);
99
const dotIndex = filePath.lastIndexOf(".");

0 commit comments

Comments
 (0)