Skip to content

Commit f4adea0

Browse files
committed
Update 2-initials.js
Initials fixed
1 parent 3dae4d0 commit f4adea0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ let lastName = "Johnson";
44

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.
7-
8-
let initials = ``;
7+
let initials = firstName[0] + middleName[0] + lastName[0];
98

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

0 commit comments

Comments
 (0)