There was an error while loading. Please reload this page.
1 parent 27f9052 commit 36dd0c6Copy full SHA for 36dd0c6
1 file changed
Sprint-2/1-key-exercises/3-paths.js
@@ -3,7 +3,7 @@ const lastSlashIndex = filePath.lastIndexOf("/");
3
const base = filePath.slice(lastSlashIndex + 1);
4
console.log(`The base part of ${filePath} is ${base}`);
5
6
-const startDirIndex = filePath.lastIndexOf("Users");
+const startDirIndex = filePath.lastIndexOf("/Users");
7
const dir = filePath.slice(startDirIndex, lastSlashIndex);
8
console.log(`The dir part of ${filePath} is ${dir}`);
9
const dotIndex = filePath.lastIndexOf(".");
0 commit comments