从数组中随机选择3个元素
用到的方法:splice()//删除数组中的某一元素
var Arr=["aaa","bbb","ccc","ddd","eee","fff"]
var arrNew=[];
for(var i=0;i<3;i++)
{
var _num = Math.floor(Math.random()*Arr.length)
var mm = Arr[_num];
Arr.splice(_num,1)
arrNew.push(mm)
}
console.log(arrNew)