JS随机从数组中取出几个元素!
let groups = ['1','2','4','5','6','7','8','9','10'];1.从数组groups中随机取出一个值let value = groups[Math.floor(Math.random()*groups.length)];value // 102.随机从数组中随机取几个值getRandomArrayValue(arr, num) { var sData = arr.slice(0), i = arr.length, min = i - num