Answers for "how to make a random true false in js"

6

javascript get random boolean

const randomBoolean = () => Math.random() >= 0.5;
Posted by: Guest on July-03-2020
13

javascript get random boolean

const randomBoolean = () =>{
  Math.ceil(Math.random() >= 0.5)
}
Posted by: Guest on June-21-2021

Code answers related to "how to make a random true false in js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language