# Parameters from parameters

**URL:** <https://forum.kirupa.com/t/parameters-from-parameters/250598>\
**Category:** programming\
**Created:** [January 30, 2008, 10:13pm UTC](https://forum.kirupa.com/t/parameters-from-parameters/250598 "2008-01-30T22:13:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mr\_beef](https://avatars.discourse-cdn.com/v4/letter/m/e9bcb4/32.png) [@Mr\_beef](https://forum.kirupa.com/u/Mr_beef)\
**Post date:** [January 30, 2008, 10:13pm UTC](https://forum.kirupa.com/t/parameters-from-parameters/250598/1 "2008-01-30T22:13:20Z")

</div>

If I have a function and then set the parameters if I then have a function within that function can I use the parametes of the first function to set parameters for the second function.

[AS]  
function thing(a,b){  
//do something  
if(\_root.whatever== true){  
function secondThing(copyA,copyB)  
}  
}  
[/AS]  
Or must I just create variables for it and then just use them?  
[AS]  
function thing(a,b){  
this.a = a  
this.b = b  
//do something  
if(\_root.whatever== true){  
function secondThing(this.a,this.b)  
}  
}  
[/AS]  
If you know of a better way then feel free to chuck that at me too :D.  
This shouldn’t be too tasking for you lol.  
Cheers,  
Mr\_Beef.
