【发布时间】:2022-12-20 20:16:07
【问题描述】:
例如:数组中有四个项目。我想随机得到一个,像这样:
array items = [
"bike" //40% chance to select
"car" //30% chance to select
"boat" //15% chance to select
"train" //10% chance to select
"plane" //5% chance to select
]
【问题讨论】:
标签: javascript select random