The conditional statement is determined from a random number using: Math.random();
I want the pop-up to display the conditional statement using the following:
- Code: Select all
var x=Math.random();
if (x>=0.3)
{alert(True);}
else
{alert(False);}
That's what I have right now. But i don't want it to alert me when the page loads, I want it to alert me when the button is clicked.
Any help would be appreciated.



