If you ask ChatGPT to explain how a callback function works you might get the following:
A callback function in JavaScript is a function that is passed as an argument to another function and is executed after some operation has completed. It allows for asynchronous code execution, i.e., the code execution does not block or wait for the completion of the callback function.