I want a javascript script that choose either value1 or value2 randomly, not between the two values , just the actual values.
Thanks!!!!
Math.round(Math.random()) returns a 0 or a 1, each value just about half the time.
Math.round(Math.random())
You can use it like a true or false, 'heads' or 'tails', or as a 2 member array index-
['true','false'][Math.round(Math.random())] will return 'true' or 'false'...
['true','false'][Math.round(Math.random())]