# Random Numbres

**URL:** <https://forum.kirupa.com/t/random-numbres/154507>\
**Category:** flash\
**Created:** [July 10, 2005, 4:38pm UTC](https://forum.kirupa.com/t/random-numbres/154507 "2005-07-10T16:38:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mgallen](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/mgallen/32/616_2.png) [@mgallen](https://forum.kirupa.com/u/mgallen)\
**Post date:** [July 10, 2005, 4:38pm UTC](https://forum.kirupa.com/t/random-numbres/154507/1 "2005-07-10T16:38:56Z")

</div>

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!!
