Challenge: Extract Initials
Tâche
Swipe to start coding
Write a function that takes a full name as a string and returns the initials in the format "X.Y." where X and Y are the first letters of each word in the name, capitalized and separated by periods.
- Split the
fullNamestring into words. - Take the first character from each word, convert it to uppercase, and add a period after each letter.
- Return the constructed initials string.
Solution
Tout était clair ?
Merci pour vos commentaires !
Section 1. Chapitre 4
single
Demandez à l'IA
Demandez à l'IA
Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion
Génial!
Completion taux amélioré à 4.76
Challenge: Extract Initials
Glissez pour afficher le menu
Tâche
Swipe to start coding
Write a function that takes a full name as a string and returns the initials in the format "X.Y." where X and Y are the first letters of each word in the name, capitalized and separated by periods.
- Split the
fullNamestring into words. - Take the first character from each word, convert it to uppercase, and add a period after each letter.
- Return the constructed initials string.
Solution
Tout était clair ?
Merci pour vos commentaires !
Section 1. Chapitre 4
single