1.8 KiB
1.8 KiB
id, challengeType, videoUrl, localeTitle
id | challengeType | videoUrl | localeTitle |
---|---|---|---|
ab6137d4e35944e21037b769 | 5 | 标题案例句子 |
Description
Instructions
Tests
tests:
- text: '<code>titleCase("I'm a little tea pot")</code>应该返回一个字符串。'
testString: assert(typeof titleCase("I'm a little tea pot") === "string");
- text: '<code>titleCase("I'm a little tea pot")</code>应该归还<code>I'm A Little Tea Pot</code> 。'
testString: assert(titleCase("I'm a little tea pot") === "I'm A Little Tea Pot");
- text: <code>titleCase("sHoRt AnD sToUt")</code>应返回<code>Short And Stout</code> 。
testString: assert(titleCase("sHoRt AnD sToUt") === "Short And Stout");
- text: <code>titleCase("HERE IS MY HANDLE HERE IS MY SPOUT")</code> <code>Here Is My Handle Here Is My Spout</code> <code>titleCase("HERE IS MY HANDLE HERE IS MY SPOUT")</code>应该回到<code>Here Is My Handle Here Is My Spout</code> 。
testString: assert(titleCase("HERE IS MY HANDLE HERE IS MY SPOUT") === "Here Is My Handle Here Is My Spout");
Challenge Seed
function titleCase(str) {
return str;
}
titleCase("I'm a little tea pot");
Solution
// solution required
/section>