2018-10-10 18:03:03 -04:00
|
|
|
|
---
|
|
|
|
|
id: af7588ade1100bde429baf20
|
|
|
|
|
title: Missing letters
|
|
|
|
|
isRequired: true
|
|
|
|
|
challengeType: 5
|
|
|
|
|
videoUrl: ''
|
|
|
|
|
localeTitle: 遗失的信件
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
## Description
|
2020-06-30 01:51:26 -07:00
|
|
|
|
<section id="description">在传递的字母范围内找到丢失的字母并将其返回。如果范围内存在所有字母,则返回undefined。如果卡住,请记得使用<a href="https://forum.freecodecamp.org/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> 。尝试配对程序。编写自己的代码。 </section>
|
2018-10-10 18:03:03 -04:00
|
|
|
|
|
|
|
|
|
## Instructions
|
|
|
|
|
<section id="instructions">
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
## Tests
|
|
|
|
|
<section id='tests'>
|
|
|
|
|
|
|
|
|
|
```yml
|
|
|
|
|
tests:
|
|
|
|
|
- text: <code>fearNotLetter("abce")</code>应返回“d”。
|
2020-02-18 01:40:55 +09:00
|
|
|
|
testString: assert.deepEqual(fearNotLetter('abce'), 'd');
|
2018-10-10 18:03:03 -04:00
|
|
|
|
- text: <code>fearNotLetter("abcdefghjklmno")</code>应该返回“i”。
|
2020-02-18 01:40:55 +09:00
|
|
|
|
testString: assert.deepEqual(fearNotLetter('abcdefghjklmno'), 'i');
|
2018-10-10 18:03:03 -04:00
|
|
|
|
- text: <code>fearNotLetter("stvwx")</code>应该返回“u”。
|
2020-02-18 01:40:55 +09:00
|
|
|
|
testString: assert.deepEqual(fearNotLetter('stvwx'), 'u');
|
2018-10-10 18:03:03 -04:00
|
|
|
|
- text: <code>fearNotLetter("bcdf")</code>应返回“e”。
|
2020-02-18 01:40:55 +09:00
|
|
|
|
testString: assert.deepEqual(fearNotLetter('bcdf'), 'e');
|
2018-10-10 18:03:03 -04:00
|
|
|
|
- text: <code>fearNotLetter("abcdefghijklmnopqrstuvwxyz")</code>应返回undefined。
|
2020-02-18 01:40:55 +09:00
|
|
|
|
testString: assert.isUndefined(fearNotLetter('abcdefghijklmnopqrstuvwxyz'));
|
2018-10-10 18:03:03 -04:00
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
## Challenge Seed
|
|
|
|
|
<section id='challengeSeed'>
|
|
|
|
|
|
|
|
|
|
<div id='js-seed'>
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
function fearNotLetter(str) {
|
|
|
|
|
return str;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fearNotLetter("abce");
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
## Solution
|
|
|
|
|
<section id='solution'>
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
// solution required
|
|
|
|
|
```
|
2020-08-13 17:24:35 +02:00
|
|
|
|
|
|
|
|
|
/section>
|