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 de9068f commit 42da013Copy full SHA for 42da013
Sprint-1/1-key-exercises/3-paths.js
@@ -21,10 +21,10 @@ const dir = filePath.slice(0,lastSlashIndex);
21
22
//Get everything after the last dot in the base:
23
const lastDotIndex = base.lastIndexOf(".");
24
-const ext = base.slice(lastSlashIndex+1);
+const ext = base.slice(-3);
25
26
-console.log('The dir part of ${filePath} is ${dir}');
27
-console.log('The ext part of ${filePath} is ${ext}');
+console.log(`The dir part of ${filePath} is ${dir}`);
+console.log(`The ext part of ${filePath} is ${ext}`);
28
29
30
// https://www.google.com/search?q=slice+mdn
0 commit comments