2.3 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	
			2.3 KiB
		
	
	
	
	
	
	
	
id, title, isRequired, challengeType, videoUrl, localeTitle
| id | title | isRequired | challengeType | videoUrl | localeTitle | 
|---|---|---|---|---|---|
| ab6137d4e35944e21037b769 | Title Case a Sentence | true | 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", "<code>titleCase("I'm a little tea pot")</code> should return a 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", "<code>titleCase("I'm a little tea pot")</code> should return <code>I'm A Little Tea Pot</code>.");'
  - text: <code>titleCase("sHoRt AnD sToUt")</code>应返回<code>Short And Stout</code> 。
    testString: 'assert(titleCase("sHoRt AnD sToUt") === "Short And Stout", "<code>titleCase("sHoRt AnD sToUt")</code> should return <code>Short And Stout</code>.");'
  - 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", "<code>titleCase("HERE IS MY HANDLE HERE IS MY SPOUT")</code> should return <code>Here Is My Handle Here Is My Spout</code>.");'
Challenge Seed
function titleCase(str) {
  return str;
}
titleCase("I'm a little tea pot");
Solution
// solution required