2020-10-06 23:10:08 +05:30

1.7 KiB
Raw Blame History

id, challengeType, videoUrl, title
id challengeType videoUrl title
5a23c84252665b21eecc7e7a 5 生成小写ASCII字母表

Description

编写一个函数以生成给定范围的小写ASCII字符数组。例如对于范围1到4函数应返回['a','b','c','d']

Instructions

Tests

tests:
  - text: <code>lascii</code>应该是一个功能。
    testString: assert(typeof lascii=='function');
  - text: <code>lascii("a","d")</code>应该返回一个数组。
    testString: assert(Array.isArray(lascii('a','d')));
  - text: <code>lascii("a","d")</code>应该返回<code>[ "a", "b", "c", "d" ]</code> 。
    testString: assert.deepEqual(lascii("a","d"),results[0]);
  - text: <code>lascii("c","i")</code>应该返回<code>[ "c", "d", "e", "f", "g", "h", "i" ]</code> 。
    testString: assert.deepEqual(lascii("c","i"),results[1]);
  - text: <code>lascii("m","q")</code>应该返回<code>[ "m", "n", "o", "p", "q" ]</code> 。
    testString: assert.deepEqual(lascii("m","q"),results[2]);
  - text: <code>lascii("k","n")</code>应返回<code>[ "k", "l", "m", "n" ]</code> 。
    testString: assert.deepEqual(lascii("k","n"),results[3]);
  - text: <code>lascii("t","z")</code>应该返回<code>[ "t", "u", "v", "w", "x", "y", "z" ]</code> 。
    testString: assert.deepEqual(lascii("t","z"),results[4]);

Challenge Seed

function lascii (cFrom, cTo) {
  // Good luck!
}

After Test

console.info('after the test');

Solution

// solution required

/section>