# Random array

**URL:** <https://forum.kirupa.com/t/random-array/201998>\
**Category:** Uncategorized\
**Created:** [September 26, 2006, 10:19pm UTC](https://forum.kirupa.com/t/random-array/201998 "2006-09-26T22:19:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![brndn](https://avatars.discourse-cdn.com/v4/letter/b/dec6dc/32.png) [@brndn](https://forum.kirupa.com/u/brndn)\
**Post date:** [September 26, 2006, 10:19pm UTC](https://forum.kirupa.com/t/random-array/201998/1 "2006-09-26T22:19:26Z")

</div>

Have put this together but the return value is not what I exspected.  
Basically I want one of the four array objects to be randomised.

the\_Dates = [“1993”, “1992”, “2000”, “1992”];

onEnterFrame = function(){  
var Randoniser = (Math.random(the\_Dates.length));  
trace(Randoniser);  
}

[COLOR=DarkRed]return in the trace  
1993  
2000  
1992  
2000  
1993  
2000[/COLOR]  
(or something like that)

I know its my syntax and probably the methods i have used that are in appropriate.
