I want to generate an array with a random number that each number is different. Could someone help me to solve this? Thanks.
var array = [];
for(var i = 0;i < 5; i++){
var a = Math.floor(Math.random() * 5);
array.push(a);
}
console.log(array);