Pass params to a function using JavaScript in a Retool workflow code block

I have created a function in a Retool workflow, and I am able to run it from JavaScript code. But I don't know how can I pass parameters to the function.

It is not able to pass the snapshot ID to the function.

Okay, so while writing this out, I thought I would give it another try.

This seems to be working:

const response = await checkSnapshotReady('s_mdfv9rux2p5we22obv');

I think the sequence of parameters matters here.