Skip to content

Commit d428922

Browse files
committed
Completed 2-initials.js exercise
1 parent 18a20f4 commit d428922

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ let lastName = "Johnson";
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

88
let initials = ``;
9+
initials += firstName.charAt(0);
10+
initials += middleName.charAt(0);
11+
initials += lastName.charAt(0);
912

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

0 commit comments

Comments
 (0)