When one function simply allows another function being the argument, this enclosed function is called the callback function. And using this callback function is one core concept of functional programming, and the user can also find them inside the most of the JavaScript codes- either inside the simple functions such as setInterval, or event listening or at the time of making the API calls.

The promise, on the other hand, is practiced to manage the asynchronous outcome of one operation. JavaScript has been designed such that it can not wait so that the asynchronous code block can execute completely before the other synchronous code parts can run. With the help of Promises, the users are able to delay the code block execution until the async request gets completed. In this manner, all other operations get to keep running that too without any interruption.

BY Best Interview Question ON 17 Jun 2020