JavaScript Promises In 90 Seconds #JavaScriptJanuary

Channel:
Subscribers:
296,000
Published on ● Video Link: https://www.youtube.com/watch?v=rFWphynq1f8



Duration: 1:42
5,731 views
258


Watch the entire #JavaScriptJanuary series from the beginning!
https://www.youtube.com/playlist?list=PLkwxH9e_vrALlH7D0XLDn2td-uoHqHFxq

The Promise object represents the eventual completion or failure of an asynchronous operation, and its resulting value. It’s like a placeholder for a value that you are waiting on.

A Promise can be in one of three states: Pending, Fulfilled, or Rejected.

When the promise is pending, JavaScript continues code execution. This way the promise, or value that you are waiting for, does not cause your program to freeze.

Eventually the promise is either fulfilled or rejected and JavaScript goes back to that code block to execute the appropriate operation.

We use “.then” to look for the promise to enter the Fulfilled state. “.then” accepts a function that receives the resolved value from the resolve method.

After that we can use “.catch” to look for the promise to enter the Rejected state. “.catch” also accepts a function that receives any errors from our reject method.

I'll be releasing a new video every day in January! Stay tuned..
_____________________________________

📚 Learn to CODE in just a FEW months here:
Treehouse Discount Code: https://treehouse.7eer.net/codeSTACKr
_____________________________________

🛠️ Tools I use:
🟠 Theme: https://marketplace.visualstudio.com/items?itemName=codestackr.codestackr-theme
🟠 Font: STACKr Code (Exclusive to my VS Code Course - https://vsCodeHero.com)
🟠 SuperHero Extension Pack: https://marketplace.visualstudio.com/items?itemName=codeSTACKr.superhero-extensions

🚢 Deploy for FREE on Vercel: https://vercel.com/ambassadors/codestackr
_____________________________________

💖 Show support!
PayPal: https://paypal.me/codeSTACKr
_____________________________________

Watch Next:
Web Development - Beginners Roadmap (2020) - https://youtu.be/iogabydg2y0
Playlist: Web Development For Beginners - https://www.youtube.com/watch?v=Ez4yHS2dsN8&list=PLkwxH9e_vrAJ0WbEsFA9W3I1W-g_BTsbt
_____________________________________

Connect With Me:
Website: http://www.codestackr.com
Twitter: https://twitter.com/codeSTACKr
Instagram: https://instagram.com/codeSTACKr/
Facebook: https://facebook.com/codeSTACKr
_____________________________________

** Affiliate Disclaimer: Some of the above links may be affiliate links, which may generate me a sales commission at no additional cost to you.

#JavaScriptJanuary #31Days31Videos #codeSTACKr







Tags:
JavaScriptJanuary
31Days31Videos
JavaScript
JS
Web Development
Web Dev
Web Development 2020
Web Dev 2020
HTML
CSS
Node.js
Chrome
ES5
ES6
ES7
javascript promises
js promises
javascript promises explained
js promises explained
javascript then
js then
javascript catch
js catch
javascript promise
js promise
promise
javascript asynchronous explained
js asynchronous programming
js asynchronous explained