I'm new to JavaScript and trying to solve an optimization problem. How can I create an array with 20 random binary values of [0, 1]? For instance something like:
[0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, ...]
The distribution of these binary values in the array should be random. Thanks