数组 随机返回其中一个数 闲者无敌 2021-11-28 337 阅读1分钟 var arr = ['j','s','从','数','组','中','随','机','取','出','一','个','元','素']; var item = arr[Math.floor(Math.random()*arr.length)]; console.log(item);