Skip to content

Commit 0968746

Browse files
committed
Complete exercise 2, I checked it with VScode runner it worked
1 parent 520774d commit 0968746

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
let firstName = "Creola";
22
let middleName = "Katherine";
33
let lastName = "Johnson";
4+
firstName[0]
5+
middleName[0]
6+
lastName[0]
7+
let initials = (firstName[0] + middleName[0] + lastName[0]);
8+
console.log (initials);
9+
10+
11+
412

513
// Declare a variable called initials that stores the first character of each string.
614
// This should produce the string "CKJ", but you must not write the characters C, K, or J in the code of your solution.
715

8-
let initials = ``;
16+
917

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

0 commit comments

Comments
 (0)