Use for()
to iterating random select
var arrayNum = ['One', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'];
var selected = [];
for (var i = 0; i < 3; i++){
selected[i] = arrayNum[Math.floor(Math.random() * arrayNum.length)];
}
console.log(selected);
If you want to select diffrent item, you need to checking selected item before inserting in new array.
var arrayNum = ['One', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'];
var selected = [];
for (var i = 0; i < 3; i++){
rand();
}
console.log(selected);
function rand(){
var ran = arrayNum[Math.floor(Math.random() * arrayNum.length)];
if (selected.indexOf(ran) == -1)
selected.push(ran);
else
rand();
}