Hello everyone. I’m traying to generate some random numbres, thats pretty easy yes? Well no, here is the catch:
All numbers must be even and they cant be the same twice.
Here is my code:
var number = new Array();
function numbers() {
var num = Math.ceil(Math.random()10);
if ((num%2) != 0) {
numbers();
}
for(i=0;i<number.length; i++){
if(number==num){
numbers();
}
number.push(num);
}
Thanks all!!