Skip to content

Home

Random boolean value

Generates a random boolean value.

const randomBoolean = () => Math.random() >= 0.5;

randomBoolean(); // true

More like this

Start typing a keyphrase to see matching snippets.