Title Case a Sentence
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- web-dev
Research direction
Start with the titleCase function and example string in the issue body, comparing the current output with the stated title-casing requirements. Verify that the completed behavior capitalizes every word, including connecting words, while lowercasing the remaining letters.
Written by the indexing model from the issue text.
Description
Hello,
So I'm beginning to understand things a little bit more! ✨
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. 🍵
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");
- Dominant language
- HTML
- Stars
- 65
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dwyl/learn-javascript
-
enhancement
dwyl/learn-javascript#39 · 1 assignee ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 20/100
dwyl/learn-javascript#38 · 3 reactions ·
-
JavaScript Grammar Open
Difficulty 5/5 Over a week Newbie friendliness 15/100
dwyl/learn-javascript#37 · 2 reactions ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 15/100
dwyl/learn-javascript#36 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 20/100
dwyl/learn-javascript#35 ·
All issues in dwyl/learn-javascript
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
pastelsky/bundlephobia#1122 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
speaches-ai/speaches#678 ·
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
jellyfin/jellyfin-web#8540 ·