3.0 KiB
3.0 KiB
title | id | challengeType | videoUrl | localeTitle |
---|---|---|---|---|
I before E except after C | 5a23c84252665b21eecc7eb0 | 5 | 我在E之前除了C之后 |
Description
- “我在E之前没有前面的C”。
- “在我之前的C之前是C”。
Instructions
Tests
tests:
- text: <code>IBeforeExceptC</code>应该是一个函数。
testString: 'assert(typeof IBeforeExceptC=="function","<code>IBeforeExceptC</code> should be a function.");'
- text: <code>IBeforeExceptC("receive")</code>应该返回一个布尔值。
testString: 'assert(typeof IBeforeExceptC("receive")=="boolean","<code>IBeforeExceptC("receive")</code> should return a boolean.");'
- text: <code>IBeforeExceptC("receive")</code>应该返回<code>true</code> 。
testString: 'assert.equal(IBeforeExceptC("receive"),true,"<code>IBeforeExceptC("receive")</code> should return <code>true</code>.");'
- text: <code>IBeforeExceptC("science")</code>应该返回<code>false</code> 。
testString: 'assert.equal(IBeforeExceptC("science"),false,"<code>IBeforeExceptC("science")</code> should return <code>false</code>.");'
- text: <code>IBeforeExceptC("imperceivable")</code>应该返回<code>true</code> 。
testString: 'assert.equal(IBeforeExceptC("imperceivable"),true,"<code>IBeforeExceptC("imperceivable")</code> should return <code>true</code>.");'
- text: <code>IBeforeExceptC("inconceivable")</code>应该返回<code>true</code> 。
testString: 'assert.equal(IBeforeExceptC("inconceivable"),true,"<code>IBeforeExceptC("inconceivable")</code> should return <code>true</code>.");'
- text: <code>IBeforeExceptC("insufficient")</code>应返回<code>false</code> 。
testString: 'assert.equal(IBeforeExceptC("insufficient"),false,"<code>IBeforeExceptC("insufficient")</code> should return <code>false</code>.");'
- text: <code>IBeforeExceptC("omniscient")</code>应该返回<code>false</code> 。
testString: 'assert.equal(IBeforeExceptC("omniscient"),false,"<code>IBeforeExceptC("omniscient")</code> should return <code>false</code>.");'
Challenge Seed
function IBeforeExceptC (word) {
// Good luck!
}
Solution
// solution required