random


Math.random() returns a floating point number between 0 and 1. parseInt(Math.random()*6+1) is throwing a dice.