Get a random boolean (true/false)


PHOTO EMBED

Mon Jan 25 2021 14:06:47 GMT+0000 (UTC)

Saved by @aymanelya #javascript

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

https://medium.com/dailyjs/13-javascript-one-liners-thatll-make-you-look-like-a-pro-29a27b6f51cb