What is the difference between synchronous and asynchronous functions?
synchronous functions stops the program until the function return the result. However asynchronous functions start the action and program continue to run. And when the asynchronous functions finish it’s job, it return the result while program is working.
What is callback hell?
When we use several callbacks within callbacks, it is callback hell. Callback hell is working code, however it looks messy and it makes the code difficult to read and understand.
Which technique can help us solve callback hell?
using promises can help us to solve callback hell.