Title Case a Sentence
- Lenguaje dominante
- HTML
- Estrellas
- 65
- Forks
- 15
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Hello,
So I'm beginning to understand things a little bit more! :sparkles:
This one is beginning to annoy me though. It's just returning "I'm a little tea pot" which is about as annoying as when you order a pot of tea and it has just one cup's worth in it. :tea:
Thanks in advance!
**QUESTION**
Return the provided string with the first letter of each word capitalized. Make sure the rest of the word is in lower case.
For the purpose of this exercise, you should also capitalize connecting words like "the" and "of".
Remember to use Read-Search-Ask if you get stuck. Write your own code.
**MY CODE**
```
function toUpperCase(str) {
str = str.toLowerCase().split(" ");
for (var i = 0; i < str.length; i++) {
str[i] = str[i].charAt(0).toUpperCase() + str[i].slice(1);
return str.join (" ");
}
}
titleCase("I'm a little tea pot");
```
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.