Home › Forums › JavaScript › Get random word from prompt imput › Re: Get random word from prompt imput
March 2, 2013 at 10:54 am
#126650
DADE
Participant
@tomrogers123
You random number calculation is wrong.
// This will never give you 2. Only 0, 1
Math.floor(Math.random()*2);
// This will give you 0-2 outcomes
Math.round(Math.random()*2);
Math.floor(Math.random()*3);