GitHub 6219★

Generate a random boolean

JavaScript version

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

TypeScript version

const randomBoolean = (): boolean => Math.random() >= 0.5;
Follow me on and to get more useful contents.