JavaScript Promises Explained | JavaScript Basics

featured image

Hey geeks! This week we are looking into Promises in JavaScript! Let’s say you are building a weather app. You have access to an awesome weather API you found on the web and you have decided to use it in your app. In order to accomplish the task, you have to use AJAX or Fetch API.

Consider that fetching the weather may not be instantaneous, i.e, it takes time. How does Fetch API make sure your app doesn’t stop working in the time the weather info arrives? By using Promises! Let’s dive into Promises in JavaScript and find out what it is all about.

Continue reading “JavaScript Promises Explained | JavaScript Basics”