Optional
Creates a generator that will produce an iteration through the range of number as requested.
range(3) // yields 0, 1, 2, 3range(0, 3) // yields 0, 1, 2, 3range(0, 3, 'y') // yields y, y, y, yrange(0, 3, () => 'y') // yields y, y, y, yrange(0, 3, i => i) // yields 0, 1, 2, 3range(0, 3, i => `y${i}`) // yields y0, y1, y2, y3range(0, 3, obj) // yields obj, obj, obj, objrange(0, 6, i => i, 2) // yields 0, 2, 4, 6 Copy
range(3) // yields 0, 1, 2, 3range(0, 3) // yields 0, 1, 2, 3range(0, 3, 'y') // yields y, y, y, yrange(0, 3, () => 'y') // yields y, y, y, yrange(0, 3, i => i) // yields 0, 1, 2, 3range(0, 3, i => `y${i}`) // yields y0, y1, y2, y3range(0, 3, obj) // yields obj, obj, obj, objrange(0, 6, i => i, 2) // yields 0, 2, 4, 6
Description
Creates a generator that will produce an iteration through the range of number as requested.
Example