2.3 KiB
2.3 KiB
id, challengeType, videoUrl, localeTitle
id | challengeType | videoUrl | localeTitle |
---|---|---|---|
594810f028c0303b75339acc | 5 | ABC问题 |
Description
您将获得ABC块的集合(例如,童年字母块)。每个街区有20个街区,两个字母。块的所有侧面都保证有完整的字母表。块的样本集合:
(BO)
(XK)
(DQ)
(CP)
(NA)
(GT)
(回覆)
(TG)
(QD)
(FS)
(JW)
(HU)
(VI)
(一个)
(OB)
(ER)
(FS)
(LY)
(PC)
(ZM)
要记住一些规则:
一旦使用了块上的字母,就不能再使用该块。该函数应该不区分大小写。实现一个带字符串(单词)的函数,并确定该单词是否可以与给定的块集合拼写。
Instructions
Tests
tests:
- text: <code>canMakeWord</code>是一个功能。
testString: assert(typeof canMakeWord === 'function');
- text: <code>canMakeWord</code>应该返回一个布尔值。
testString: assert(typeof canMakeWord('hi') === 'boolean');
- text: <code>canMakeWord("bark")</code>应该返回true。
testString: assert(canMakeWord(words[0]));
- text: <code>canMakeWord("BooK")</code>应该返回false。
testString: assert(!canMakeWord(words[1]));
- text: <code>canMakeWord("TReAT")</code>应该返回true。
testString: assert(canMakeWord(words[2]));
- text: <code>canMakeWord("COMMON")</code>应返回false。
testString: assert(!canMakeWord(words[3]));
- text: <code>canMakeWord("squAD")</code>应该返回true。
testString: assert(canMakeWord(words[4]));
- text: <code>canMakeWord("conFUSE")</code>应该返回true。
testString: assert(canMakeWord(words[5]));
Challenge Seed
function canMakeWord (word) {
// Good luck!
}
After Test
console.info('after the test');
Solution
// solution required
/section>