2020-06-30 14:21:26 +05:30

1.6 KiB
Raw Blame History

id, title, isRequired, challengeType, videoUrl, localeTitle
id title isRequired challengeType videoUrl localeTitle
af7588ade1100bde429baf20 Missing letters true 5 遗失的信件

Description

在传递的字母范围内找到丢失的字母并将其返回。如果范围内存在所有字母则返回undefined。如果卡住请记得使用Read-Search-Ask 。尝试配对程序。编写自己的代码。

Instructions

Tests

tests:
  - text: <code>fearNotLetter(&quot;abce&quot;)</code>应返回“d”。
    testString: assert.deepEqual(fearNotLetter('abce'), 'd');
  - text: <code>fearNotLetter(&quot;abcdefghjklmno&quot;)</code>应该返回“i”。
    testString: assert.deepEqual(fearNotLetter('abcdefghjklmno'), 'i');
  - text: <code>fearNotLetter(&quot;stvwx&quot;)</code>应该返回“u”。
    testString: assert.deepEqual(fearNotLetter('stvwx'), 'u');
  - text: <code>fearNotLetter(&quot;bcdf&quot;)</code>应返回“e”。
    testString: assert.deepEqual(fearNotLetter('bcdf'), 'e');
  - text: <code>fearNotLetter(&quot;abcdefghijklmnopqrstuvwxyz&quot;)</code>应返回undefined。
    testString: assert.isUndefined(fearNotLetter('abcdefghijklmnopqrstuvwxyz'));

Challenge Seed

function fearNotLetter(str) {
  return str;
}

fearNotLetter("abce");

Solution

// solution required