Skip to content
Closed
Prev Previous commit
Next Next commit
fix for sprint 1 key exercise 3-paths
  • Loading branch information
Mikiyas-STP committed Feb 15, 2025
commit b3fe3d903f1572fe91567c9bbf90c23ae8dc785e
2 changes: 1 addition & 1 deletion Sprint-1/1-key-exercises/3-paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ console.log(`The base part of ${filePath} is ${base}`);
// Create a variable to store the dir part of the filePath variable
// Create a variable to store the ext part of the variable

const dire = filePath.slice(1, lastSlashIndex);
const dire = filePath.slice(0, lastSlashIndex);
const ext = filePath.slice(filePath.lastIndexOf("."));
console.log("The Directory is", dire);
console.log("The extension is ", ext);
Expand Down