查漏补缺——解释s()函数的作用
问题
如题所示
相关源码:
function s() {
return "rgb(" + ~~(255 * Math.random()) + ","
+ ~~(255 * Math.random())
+ "," + ~~(255 * Math.random()) + ")"
}
答案
这个函数就是在生成随机的颜色值。
如题所示
相关源码:
function s() {
return "rgb(" + ~~(255 * Math.random()) + ","
+ ~~(255 * Math.random())
+ "," + ~~(255 * Math.random()) + ")"
}
这个函数就是在生成随机的颜色值。