The callback keyword can be used as the last parameter to define a custom callback function. The callback() function at the end of the function can then be used to call it. Optionally, the typeof operator is used to determine whether the supplied argument is a function.