We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a66e3fe commit ed76a69Copy full SHA for ed76a69
Sprint-1/1-key-exercises/2-initials.js
@@ -9,7 +9,7 @@ let lastName = "Johnson";
9
//Solution using charAt() a Javascript string method that returns a character's position, using template literal
10
// and toUpperCase to ensure it is capitalized.
11
let initials = `${firstName.charAt(0)}${middleName.charAt(0)}${lastName.charAt(0)}`.toUpperCase();
12
-
+console.log(initials);
13
14
//alternative solution using string indexing, template literal and toUppercase(to make sure it is capitalized)
15
//let initials - `${firstName[0]}${middleName[0]}${lastName[0]}`.toUpperCase());
0 commit comments