Learning how to use JavaScript Promises, Constructing a Promise Object, JavaScript Promise Example

Channel:
Subscribers:
7,740
Published on ● Video Link: https://www.youtube.com/watch?v=MuoiU8nRuTc



Category:
Tutorial
Duration: 6:48
99 views
3


This JavaScript programming lesson is on Learning how to use JavaScript Promises, Constructing a Promise Object, and JavaScript Promise Example. We learned what JavaScript Promises are last video, but in this lesson, we see how to construct a promise object in JavaScript. We learn that the 3 most important keywords are "new Promise()", "resolve", and "reject". In order to understand JavaScript functions, it is important to understand that a promise has 3 states. We also learned it last lesson, but the 3 states are "pending" "fulfilled", and "rejected". We specify what should happen if the promise is resolved, and what to do if a promise is rejected. In a real setting we would create a promise, and it might be for a query in a database, and if the promise is resolved, it might return some data from the DB, and if some error was to arise, the promise may be rejected. Learning how to use JavaScript promises requires practice. Make sure to practice using JavaScript promises and look up more examples to truly understand how promises work in JavaScript. Constructing promises in JavaScript is a key step on your JavaScript programming journey! Make sure to understand how promises work in JavaScript, before moving on!




Other Videos By We Will Code


2022-04-08Escape Sequences in PHP, How to Use PHP Escape Sequences, Escape Sequences Explained on Codecademy
2022-04-08What are Strings in PHP, How to Create PHP String, The String Data Type Explained, PHP on Codecademy
2022-04-08Review for Introduction to PHP on Codecademy's Learn PHP Course, Review Beginner PHP Concepts
2022-04-08Todo App, Create, Read, Update, Delete, What is CRUD in PHP, How CRUD Works in PHP, Codecademy PHP
2022-04-08How PHP Comments Work, Comment in PHP, Multi-Line PHP Comment, Single Line PHP Comment, Codecademy
2022-04-08How is PHP Executed, Writing a PHP Script File, Codecademy's Learn PHP, General Purpose Programming
2022-04-07How is PHP Used in HTML, Learn PHP, Codecademy, Build Dynamic Web Pages in PHP, The PHP Interpreter
2022-04-07The History of PHP, Learn PHP History, PHP History Explained for Beginners, Codecademy Learn PHP
2022-04-07Why Learn PHP, Introduction to PHP Programming Language, Codecademy Free Full PHP Programming Course
2022-04-05Node setTimeout Function JavaScript Promises Explained, Promises in JavaScript Explained, Codecademy
2022-04-04Learning how to use JavaScript Promises, Constructing a Promise Object, JavaScript Promise Example
2022-04-04Intro to JavaScript Promises, What is a Promise in JavaScript, Asynchronous Programming Codecademy
2022-04-04How to Import Modules in Node JS, Exporting Modules in Node JS, Use Modules with Require, Codecademy
2022-04-03Why Use Static Methods, Static VS Instance Methods JavaScript Walkthrough, JavaScript Static Methods
2022-04-01Add New Method to Child Class In JavaScript, Learn Intermediate JavaScript Inheritance V, Codecademy
2022-03-31Understanding JavaScript Class Inheritance, Inherit from Parent Class, Inheritance IV, Codecademy JS
2022-03-31First Time Ever Playing Destiny, PS4 Disc In PS5, Destiny Gameplay Guide for First Time Players
2022-03-30Inherit from a Parent Class, Super and Extends Keyword in JavaScript Codecademy's, Inheritance III
2022-03-30Jordan Peterson on Programming, Should I Learn to Program, Jordan Peterson on Coding and Technology
2022-03-30Playing A Plague Tale Innocence Walkthrough, Ch 2 The Strangers, Beginners Guide, New PS5 Games 2022
2022-03-29JavaScript Class Inheritance Explained, Codecademy's Learn Intermediate JavaScript, Inheritance II



Tags:
Code
Coding
ES6
JavaScript
Programming
Tutorials