We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2fc4c90 commit e6ec04bCopy full SHA for e6ec04b
Sprint-1/1-key-exercises/3-paths.js
@@ -18,10 +18,6 @@ const ext=base.slice(base.lastIndexOf(".") + 1); // The code uses the lastIndexO
18
// Create a variable to store the dir part of the filePath variable
19
const dir = filePath.slice(0, lastSlashIndex);// The code uses the lastIndexOf method to find the position of the last slash in;
20
filePath.slice(0, lastSlashIndex);
21
-filePath
22
- .slice(lastSlashIndex + 1)
23
- .split(".")
24
- .pop();
25
console.log(`The dir part of ${filePath} is ${dir}`);
26
console.log(`The base part of ${filePath} is ${base}`);
27
console.log(`The ext part of ${filePath} is ${ext}`);
0 commit comments