Looking for a code that can log either YES or NO in Javascript. Can anyone help me out with this?
console.log(Math.random() >= 0.5 ? 'YES' : 'NO');
I've attempted using
console.log(Math.round(Math.random))
but it doesn't seem to work. Any similar coin flip randomizer would also do the trick.