Binary generator

Returns a binary number. The bounds are inclusive.

number.binary

Generator settings

Generate data to see results here.

Parameters & Example

Returns a binary number. The bounds are inclusive.

number.binary(options?: number | { min?: number; max?: number; })
options
Maximum value or options object.
options.min
Lower bound for generated number. Defaults to 0.
options.max
Upper bound for generated number. Defaults to 1.

Example

"1"

Use synthetic data in a test environment.

Related generators

Explore scenarios