In this lesson, we take a look at promises in javascript. Javascript promises allow us to run code, once a task completes. In other words, it is fulfilling a promise. We use promises when we want to execute code if a task completes and if there is an error, to reject the promise from completing and throw an error. In this lesson, we look at the basic syntax for setting up a new promise. We do this using the new Promise keywords which constructs a new promise for us. Many times, promises are used when waiting for some response from a server. For example, if we make a request to GET information from the server, a promise will wait for the response which will either be successful or be rejected.