09
Oct
Restaurants A promise in JavaScript is just a pending task. It’s like ordering food at a restaurant: when you place your order, the server makes a promise to bring the food you ordered. Once the food is brought to the table the promise has been fulfilled. If the food you ordered can’t be served because the kitchen is out of a key ingredient, then you can catch a meal somewhere else. This is all asynchronous. When you sit down at the table, you might be chatting with a friend or scrolling on your phone. You pause what you were doing…