This tutorial shows in great detail how to use function as a function parameter in JavaScript. I hope it was useful to you.