扫码关注官方订阅号
我测试并没有发现什么不同
~~(0+Math.random()*51)
应该是没用,可能是套公式保留下来的。
题主这么写谁看得懂啊,还是写成Math.floor(Math.random() * 51)比较好吧。
Math.floor(Math.random() * 51)
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
扫描下载App
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
应该是没用,可能是套公式保留下来的。
题主这么写谁看得懂啊,还是写成
Math.floor(Math.random() * 51)
比较好吧。