bool
// usages
randBox.bool()
randBox.bool({ likelihood: 30 })Return a random boolean value (true or false).
randBox.bool();
=> trueThe default likelihood of success (returning true) is 50%.
Can optionally specify the likelihood in percent:
randBox.bool({likelihood: 30});
=> falseIn this case only a 30% likelihood of true, and a 70% likelihood of false.
Last updated on: