You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
415 B
415 B
bool
// usages
chance.bool()
chance.bool({ likelihood: 30 })
Return a random boolean value (true
or false
).
chance.bool();
=> true
The default likelihood of success (returning true
) is 50%.
Can optionally specify the likelihood in percent:
chance.bool({likelihood: 30});
=> false
In this case only a 30% likelihood of true
, and a 70% likelihood of false
.