random number javascript between 1 and 50 code example Example: javascript random number between Math.floor(Math.random() * 6) + 1