(Math.random() * 1000) % 7代表什么意思?

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/03 20:35:42
(Math.random() * 1000) % 7代表什么意思?

(Math.random() * 1000) % 7代表什么意思?
(Math.random() * 1000) % 7代表什么意思?

(Math.random() * 1000) % 7代表什么意思?
发生个随机数, 取前四位, 除7后的余数
Math.random() * 1000 % 7