Skip to content

Range

range()

给定左右端点构造一个范围。

  • Type
  • Details

传入两个数字或字符类型的参数(记为 ),则结果为数学意义上的闭区间

  • Example
js
range(1, 5); //[1, 2, 3, 4, 5]
range('a')('c'); //['a', 'b', 'c']
range(1, 5); //[1, 2, 3, 4, 5]
range('a')('c'); //['a', 'b', 'c']

PureEval released under the GPL-3.0 License.