dwyl / dwyl/learn-javascript

Title Case a Sentence

オープン
#25 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
question
主要言語
HTML
スター
65
フォーク
15
PR マージ指標
30日以内にマージされた PR はありません

説明

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");
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
web-dev
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。