2.0 KiB
2.0 KiB
id, title, isRequired, challengeType, videoUrl, localeTitle
id | title | isRequired | challengeType | videoUrl | localeTitle |
---|---|---|---|---|---|
a103376db3ba46b2d50db289 | Spinal Tap Case | true | 5 | 脊椎龙头套 |
Description
Instructions
Tests
tests:
- text: <code>spinalCase("This Is Spinal Tap")</code>应该返回<code>"this-is-spinal-tap"</code> 。
testString: assert.deepEqual(spinalCase("This Is Spinal Tap"), "this-is-spinal-tap");
- text: <code>spinalCase("thisIsSpinal Tap")</code>应该返回<code>"this-is-spinal-tap"</code> 。
testString: assert.strictEqual(spinalCase('thisIsSpinalTap'), "this-is-spinal-tap");
- text: <code>spinalCase("The_Andy_ Griffith_Show")</code>应该返回<code>"the-andy-griffith-show"</code> 。
testString: assert.strictEqual(spinalCase("The_Andy_Griffith_Show"), "the-andy-griffith-show");
- text: <code>spinalCase("Teletubbies say Eh-oh")</code>应该返回<code>"teletubbies-say-eh-oh"</code> 。
testString: assert.strictEqual(spinalCase("Teletubbies say Eh-oh"), "teletubbies-say-eh-oh");
- text: <code>spinalCase("AllThe-small Things")</code>应该归还<code>"all-the-small-things"</code> 。
testString: assert.strictEqual(spinalCase("AllThe-small Things"), "all-the-small-things");
Challenge Seed
function spinalCase(str) {
// "It's such a fine line between stupid, and clever."
// --David St. Hubbins
return str;
}
spinalCase('This Is Spinal Tap');
Solution
// solution required