我正在使用developer.mozilla.com的功能
console.log(getRandomInt(1));
function getRandomInt(max) {
return Math.floor(Math.random() * Math.floor(max));
}
我只需要它是 1 或 0。
如果我在 chrome 开发者控制台中调用上面的脚本,那么我总是得到“未定义”
一只斗牛犬
相关分类