Well, I don’t know anything about codes…So ummm, can anyone make me a code for drawing a number 1-16, and eliminating the number after it’s been chosen once. So like, I get 6 the first time, then I can’t get 6 again….
<i> </i><script type="text/javascript"> <!--// Written by: [email protected] \; function randomNumber(maxNumber,howmany){ var theNumbers = [], display = ''; var randNumber = Math.round(Math.random()*maxNumber+1); while(theNumbers.length < howmany){ for(var count=0; count < theNumbers.length; count++){ while(randNumber == theNumbers[count]){ randNumber = Math.round(Math.random()*maxNumber+1); count = 0; } } theNumbers.push(randNumber); display += '<b>'+(count+1)+'</b>: '+theNumbers[count]+'<br>'; } document.write(display); } randomNumber(16,16); //--> </script>
Help @Terg spread the word by sharing this article on Twitter...