I want a javascript script that choose either value1 or value2 randomly, not between the two values , just the actual values.
Thanks!!!!
The Math.random[MDN] function chooses a random value in the interval [0, 1). You can take advantage of this to choose a value randomly.
[0, 1)
var chosenValue = Math.random() < 0.5 ? value1 : value2;