# Pass array values to function arguments

**URL:** https://forum.kirupa.com/t/pass-array-values-to-function-arguments/267232
**Category:** flash
**Created:** [July 29, 2008, 11:13pm UTC](https://forum.kirupa.com/t/pass-array-values-to-function-arguments/267232 "2008-07-29T23:13:54Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![sandcar](https://avatars.discourse-cdn.com/v4/letter/s/dbc845/32.png) [@sandcar](https://forum.kirupa.com/u/sandcar)
#### Post date: [July 29, 2008, 11:13pm UTC](https://forum.kirupa.com/t/pass-array-values-to-function-arguments/267232/1 "2008-07-29T23:13:54Z")

</div>

hi all,

Maybe someone could help me !

it’s possible to do this ?

I have an array with some values and i want to pass this values to a function arguments.

example

var theArray:Array = new Array(“test1”,“teste2”,“teste3”);

function hello(t:Number,a:Array){  
// do something  
test(a)

}

hello(5,theArray)

function test(arg1,arg2,arg3){

// do something  
}

I now that i can do like this:  
test(theArray[0],theArray[1],theArray[2])

but there is another way to do that ?

thanks in advance,
