Passing variables through a function of a function

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


step1(func) {

step2() {

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?