Randomly generate boolean in Javascript NG November 23, 2022November 23, 2022 Code, How to, JavaScript In order to randomly generate boolean in javascript following method can be used var bool = Math.random() < 0.5;