how to generate a random number from 0-2 in javascript code example Example: javascript random number between 0 and 10 Math.floor(Math.random() * 10);