how to calculate a random number using math code example Example: generate number using math random in javascript console.log(Math.round(Math.random() * 10))