Math.random()用法

337 阅读1分钟

介绍:

Math.random()取值范围【0,1),即0-1之间的随机数(包括0,不包括1),可以是小数

总结

image.png

例子:

image.png