# Arrays

**URL:** https://forum.kirupa.com/t/arrays/290056
**Category:** Uncategorized
**Created:** [June 9, 2009, 6:37am UTC](https://forum.kirupa.com/t/arrays/290056 "2009-06-09T06:37:42Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![dilpreet](https://avatars.discourse-cdn.com/v4/letter/d/51bf81/32.png) [@dilpreet](https://forum.kirupa.com/u/dilpreet)
#### Post date: [June 9, 2009, 6:37am UTC](https://forum.kirupa.com/t/arrays/290056/1 "2009-06-09T06:37:42Z")

</div>

Hey i am making a quiz which is going to have 20 questions and i have about 40 question in the questions array. Now can you please tell me how to make a variable which will hold the 20 random question so

for eg

var arrQuestion:Array = [40 questions in here separated by commas]  
var randQuestions:int = arrQuestion.length-1;

but that just sets randQuestions to the arrQuestion’s length now how do i set the variable randQuestion with 20 questions that are randomly picked from arrQuestion.
