Skip to content

Commit f3bef1e

Browse files
committed
declared a variable startDirIndex to save the start index of the string User
1 parent 7a6f25a commit f3bef1e

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
@@ -16,7 +16,7 @@ console.log(`The base part of ${filePath} is ${base}`);
1616

1717
gi
1818
// Create a variable to store the ext part of the variable
19-
19+
const startDirIndex = filePath.lastIndexOf("Users"):
2020
const dir = filePath.slice(filePath.lastIndexOf("Users"),lastSlashIndex);
2121
console.log(`The dir part of ${filePath} is ${dir}`);
2222
const dotIndex = filePath.lastIndexOf(".");

0 commit comments

Comments
 (0)