Skip to content

Commit 635a1a0

Browse files
authored
Update 3-paths.js
cleaning the comments of sprint-1 works on sprint-3
1 parent 93fae64 commit 635a1a0

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

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

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,9 @@ const base = filePath.slice(lastSlashIndex + 1);
1515
console.log(`The base part of ${filePath} is ${base}`);
1616

1717
// Create a variable to store the dir part of the filePath variable
18-
19-
20-
const dir = filePath.slice(0, lastSlashIndex);// The code uses the lastIndexOf method to find the position of the last slash in;
21-
console.log(`The dir part of ${filePath} is ${dir}`);
22-
filePath.slice(0, lastSlashIndex);
23-
24-
filePath
25-
.slice(lastSlashIndex + 1)
26-
.split(".")
27-
.pop();
2818
// Create a variable to store the ext part of the variable
2919

30-
const ext=base.slice(base.lastIndexOf(".") + 1); // The code uses the lastIndexOf method to find the position of the last dot in the base variable.
31-
console.log(`The ext part of ${filePath} is ${ext}`);
20+
const dir = ;
21+
const ext = ;
22+
23+
// https://www.google.com/search?q=slice+mdn

0 commit comments

Comments
 (0)