Since that argument is sent over the internet, there is literally no way to send functions. It would also be a bad idea to let the client send arbitrary code to the server.
i could think of use cases though. say you have a developer game of sorts, or even just a sort of shared live coding IDE, perhaps you pass the functions as strings to the server–the server never evals them–and then passes the functions on to other clients as part of a collection. the other clients can then eval them. …in fact, that’s exactly what any collaborative coding environment does.
Yes, you could do that. But I don’t think that’s the situation that the OP was in. Sending JavaScript code as a string from a client is a reasonable thing to do if your app involves users writing custom code on the frontend, but it’s not reasonable to use that code as a trusted source of application logic without carefully sandboxing it.