(arr, count)
| 207 | } |
| 208 | |
| 209 | function getRandomArrayElements(arr, count) { |
| 210 | var shuffled = arr.slice(0), i = arr.length, min = i - count, temp, index; |
| 211 | while (i-- > min) { |
| 212 | index = Math.floor((i + 1) * Math.random()); |
| 213 | temp = shuffled[index]; |
| 214 | shuffled[index] = shuffled[i]; |
| 215 | shuffled[i] = temp; |
| 216 | } |
| 217 | return shuffled.slice(min); |
| 218 | } |
| 219 | |
| 220 | async function help() { |
| 221 | await new Promise((resolve) => { |