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

来源:学生作业帮助网 编辑:作业帮 时间:2024/07/02 04:55:26
(Math.random() * 1000) % 7代表什么意思?

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

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