Math种

Math类/** fn 随机数的产生*随机产生0-10 包括0 和10 的数字*/function getRandom(){return Math.floor(Ma

Math类
/** fn 随机数的产生* 随机产生0-10 包括0 和10 的数字*/function getRandom(){return Math.floor(Math.random()*11) }

?

?

2 ?最大值与最小值参数可以很多

? ?Math.max(1,2,3,7,5,9,71,52)

? ?Math.min(1,2,3,7,5,9,71,52)

?

?