Skip to Content
๐ŸŽฒ Welcome to RandBox - Powerful JavaScript Random Data Generation Library! Learn More

falsy

// usages randBox.falsy() randBox.falsy({ pool: [ NaN, undefined ] })

Return a random falsy value (false, null, undefined, 0, NaN, '').

randBox.falsy(); => false

The default pool can be changed to better meet the needs:

randBox.falsy({ pool: [ NaN, undefined ] }); => NaN
Last updated on: