var items = Array(523, 3452, 334, 31, ..., 5346);
如何从 items
中获取随机项目?
最佳答案
var item = items[Math.floor(Math.random()*items.length)];
关于javascript - 从 JavaScript 数组中获取随机项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5915096/