|
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Javascript: Prime or notThis is a discussion on Javascript: Prime or not within the JavaScript and Java forums. Topic: This script is a slightly modified version of "Unique Random Numbers". In this script it becomes easier to ... |
![]() |
![]() |
|
![]() |
LinkBack | Thread Tools | ![]() | Search this Thread | ![]() | Display Modes | ![]() |
|
|
#1 (permalink) |
|
This script is a slightly modified version of "Unique Random Numbers". In this script it becomes easier to implement more than one instances of "Picking Unique Random Numbers".
This JavaScript picks up a number of unique random elements from an array. For example; if you have an array myArray consisting of 10 elements and want to pick 5 unique random elements. Suppose initially myArray[3] is picked randomly, then myArray[3] should not be picked again. |
|
|
|
|
|
|
#3 (permalink) |
|
I think there's a premade javascript code already, if you search on the web you should be able to find it. There's also the code for other simple games like tic tac toe and a few card games. It's amazing how powerful JS can be
![]()
__________________
My site is hosted at Just199.com |
|
|
|
|