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 a15cc87 commit e88b81fCopy full SHA for e88b81f
Sprint-1/1-key-exercises/3-paths.js
@@ -17,9 +17,12 @@ console.log(`The base part of ${filePath} is ${base}`);
17
// Create a variable to store the dir part of the filePath variable
18
// Create a variable to store the ext part of the variable
19
20
+
21
const dir = filePath.slice(0, lastSlashIndex);
22
const lastDotIndex = base.lastIndexOf(".");
23
const ext = base.slice(lastDotIndex + 1);
24
25
26
27
28
// https://www.google.com/search?q=slice+mdn
0 commit comments