how to get a random number on a variable javascript code example Example: javascript random number between Math.floor(Math.random() * 6) + 1