902 B
902 B
id, title, challengeType
id | title | challengeType |
---|---|---|
af7588ade1100bde429baf20 | 寻找缺失的字母 | 5 |
--description--
在这道题目中,我们需要写一个函数,找出传入的字符串里缺失的字母并返回它。
判断缺失的依据是字母顺序。对于没有缺失的情况,请返回 undefined
。
--hints--
fearNotLetter("abce")
应返回 "d"。
assert.deepEqual(fearNotLetter('abce'), 'd');
fearNotLetter("abcdefghjklmno")
应返回 "i"。
assert.deepEqual(fearNotLetter('abcdefghjklmno'), 'i');
fearNotLetter("stvwx")
应返回 "u"。
assert.deepEqual(fearNotLetter('stvwx'), 'u');
fearNotLetter("bcdf")
应返回 "e"。
assert.deepEqual(fearNotLetter('bcdf'), 'e');
fearNotLetter("abcdefghijklmnopqrstuvwxyz")
应返回 undefined。
assert.isUndefined(fearNotLetter('abcdefghijklmnopqrstuvwxyz'));