running this code will give me one random number what I need is to change it to generate me 1000 on each run
function randomdnumber(){
var randomdnumber = "";
var nb = new Array();
nb[9] = 0;
for(i = 0,y = 10 ; i < 9 ; i++,y--)
nb[i] = Math.floor((Math.random()*10)),nb[9] += (nb[i]*y);
for(i = 0 ; i < 9 ; i++)
randomdnumber += nb[i];
nb[9] = nb[9]-(parseInt(nb[9]/11)*11);
if(nb[9] == 0 || nb[9] == 1)
randomdnumber += nb[9];
else
randomdnumber += (11 - nb[10]);
return randomdnumber;
}
print(+randomdnumber());
works better