View Single Post
Old 10-31-2007, 10:01 AM   #1 (permalink)
gehher
 
Status: Junior Member
Join Date: Oct 2007
Posts: 8
Trader Rating: (0)
gehher is on a distinguished road
TD$: 90.00
Donate
Smile Javascript: Prime or not
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.
gehher is offline   Reply With Quote