Skip to content

Commit 01515b5

Browse files
authored
Add initials extraction from name components
1 parent 5f983da commit 01515b5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ let lastName = "Johnson";
88
let initials = ``;
99

1010
// https://www.google.com/search?q=get+first+character+of+string+mdn
11-
11+
// added by ChunYanWong for the solution
12+
initials = firstName.substring(0,1) + middleName.substring(0,1) + lastName.substring(0,1);

0 commit comments

Comments
 (0)