# Passing variables through a function of a function

**URL:** <https://forum.kirupa.com/t/passing-variables-through-a-function-of-a-function/121673>\
**Category:** Uncategorized\
**Created:** [September 5, 2004, 2:36pm UTC](https://forum.kirupa.com/t/passing-variables-through-a-function-of-a-function/121673 "2004-09-05T14:36:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![marc0047](https://avatars.discourse-cdn.com/v4/letter/m/ce73a5/32.png) [@marc0047](https://forum.kirupa.com/u/marc0047)\
**Post date:** [September 5, 2004, 2:36pm UTC](https://forum.kirupa.com/t/passing-variables-through-a-function-of-a-function/121673/1 "2004-09-05T14:36:17Z")

</div>

I have been able to find documentation on calling a function through a function like thus:

step1(step2);

step1(func) {  
func();  
}

step2() {  
trace(“done”);  
}

However, I have had very little luck on finding information on enclosing parameters in functions that I want to call inside another function. Using the above example, what I would like to do instead is use step1() to call the step2() plus enclose paramaters.

Something like this: step1( step2(“done”) );

But obviously this doesn’t work. I am unsure if this is possible, and if there is a better method to complete this?
