WLJS LogoWLJS Notebook

Range

Range[imax] generates the list {1, 2, ..., imax}.

Range[imin, imax] generates the list {imin, ..., imax}.

Range[imin, imax, di] uses step di.

Examples

Generate integers 1 to 5:

Range[5]
(* {1, 2, 3, 4, 5} *)

Generate with custom start and step:

Range[0, 10, 2]
(* {0, 2, 4, 6, 8, 10} *)

Please visit the official Wolfram Language Reference for more details.

On this page