2.7 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	
			2.7 KiB
		
	
	
	
	
	
	
	
id, title, isRequired, challengeType, videoUrl, localeTitle
| id | title | isRequired | challengeType | videoUrl | localeTitle | 
|---|---|---|---|---|---|
| aa7697ea2477d1316795783b | Pig Latin | true | 5 | 猪拉丁文 | 
Description
Instructions
Tests
tests:
  - text: <code>translatePigLatin("california")</code>应该返回“aliforniacay”。
    testString: 'assert.deepEqual(translatePigLatin("california"), "aliforniacay", "<code>translatePigLatin("california")</code> should return "aliforniacay".");'
  - text: <code>translatePigLatin("paragraphs")</code>应该返回“aragraphspay”。
    testString: 'assert.deepEqual(translatePigLatin("paragraphs"), "aragraphspay", "<code>translatePigLatin("paragraphs")</code> should return "aragraphspay".");'
  - text: <code>translatePigLatin("glove")</code>应该返回“oveglay”。
    testString: 'assert.deepEqual(translatePigLatin("glove"), "oveglay", "<code>translatePigLatin("glove")</code> should return "oveglay".");'
  - text: <code>translatePigLatin("algorithm")</code>应返回“algorithmway”。
    testString: 'assert.deepEqual(translatePigLatin("algorithm"), "algorithmway", "<code>translatePigLatin("algorithm")</code> should return "algorithmway".");'
  - text: <code>translatePigLatin("eight")</code>应该返回“八通”。
    testString: 'assert.deepEqual(translatePigLatin("eight"), "eightway", "<code>translatePigLatin("eight")</code> should return "eightway".");'
  - text: 应该处理第一个元音出现在单词末尾的单词。
    testString: 'assert.deepEqual(translatePigLatin("schwartz"), "artzschway", "Should handle words where the first vowel comes in the end of the word.");'
  - text: 应该处理没有元音的单词。
    testString: 'assert.deepEqual(translatePigLatin("rhythm"), "rhythmay", "Should handle words without vowels.");'
Challenge Seed
function translatePigLatin(str) {
  return str;
}
translatePigLatin("consonant");
Solution
// solution required