const array = ['a', 'b', 'c', 'd']; ; const n = 2; // number of elements we want to get ; const shuffledArray = array.sort(() => 0.5 - Math.random()); // shuffles ...
確定! 回上一頁