Skip to content

Commit 42da013

Browse files
committed
amend
1 parent de9068f commit 42da013

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sprint-1/1-key-exercises/3-paths.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ const dir = filePath.slice(0,lastSlashIndex);
2121

2222
//Get everything after the last dot in the base:
2323
const lastDotIndex = base.lastIndexOf(".");
24-
const ext = base.slice(lastSlashIndex+1);
24+
const ext = base.slice(-3);
2525

26-
console.log('The dir part of ${filePath} is ${dir}');
27-
console.log('The ext part of ${filePath} is ${ext}');
26+
console.log(`The dir part of ${filePath} is ${dir}`);
27+
console.log(`The ext part of ${filePath} is ${ext}`);
2828

2929

3030
// https://www.google.com/search?q=slice+mdn

0 commit comments

Comments
 (0)