ilmus
01-27-2005, 06:32 PM
Hi,
I'm using the following code to create an array with 3 random integers. I'm not sure if it is working but if it is the array might contain duplicates. Can someone please suggest a way to check the array for duplicates and replace them with new entries?
var picnums = new array()
for (x=0; x<3; x++){
var picnums[x]=Math.floor(Math.random() *8)
}
Many Thanks
ilmus
I'm using the following code to create an array with 3 random integers. I'm not sure if it is working but if it is the array might contain duplicates. Can someone please suggest a way to check the array for duplicates and replace them with new entries?
var picnums = new array()
for (x=0; x<3; x++){
var picnums[x]=Math.floor(Math.random() *8)
}
Many Thanks
ilmus