Skip to content

Commit ec6019a

Browse files
committed
code done
1 parent cbac6c9 commit ec6019a

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Sprint-1/1-key-exercises/2-initials.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ let lastName = "Johnson";
55
// Declare a variable called initials that stores the first character of each string.
66
// This should produce the string "CKJ", but you must not write the characters C, K, or J in the code of your solution.
77

8-
let initials = firstName[0]+middleName[0]+lastName[0];
8+
let initials = firstName[0]+middleName[0]+lastName[0]:
99

1010
// https://www.google.com/search?q=get+first+character+of+string+mdn
1111

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ console.log(`The base part of ${filePath} is ${base}`);
2020
const dir = filePath.slice(0,lastSlashIndex);
2121

2222
//Get everything after the last dot in the base
23-
const lastDotIndex = base.lastIndexOf(".")
24-
const ext = ;
23+
const lastDotIndex = base.lastIndexOf(".");
24+
const ext = base.slice(lastSlashIndex+1);
25+
26+
console.log('The dir part of ${filePath} is ${dir}');
27+
console.log('The ext part of ${filePath} is ${ext}');
28+
2529

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

0 commit comments

Comments
 (0)