Callback is a function that is being passed to an async task on completion the function will be executed.

Callbacks make sure that a function is not going to run before a task is completed but will run right after the task has completed. It helps us develop asynchronous JavaScript code and keeps us safe from problems and                                              errors.