Promises - Beau teaches JavaScript

  Рет қаралды 29,732

freeCodeCamp.org

freeCodeCamp.org

7 жыл бұрын

A promise in JavaScript represents the eventual result of an asynchronous operation. Learn how they work in this video.
Code:
🔗 codepen.io/beaucarnes/pen/Qdr...
More information:
🔗 davidwalsh.name/promises
🔗 developer.mozilla.org/en-US/d...
Beau Carnes on Twitter: / carnesbeau
⭐JavaScript Playlists⭐
▶JavaScript Basics: • JavaScript Basics Course
▶ES6: • ES6 - Beau teaches Jav...
▶Design Patterns: • Design Patterns - Beau...
▶Data Structures and Algorithms: • Data Structures and Al...
▶Clean Code: • Clean Code - Beau teac...
-
We're busy people who learn to code, then practice by building projects for nonprofits. Learn Full-stack JavaScript, build a portfolio, and get great references with our open source community.
Join our community at freecodecamp.com
Follow us on twitter: / freecodecamp
Like us on Facebook: / freecodecamp
Follow Quincy on Quora: www.quora.com/Quincy-Larson

Пікірлер: 41
@meinsouza
@meinsouza 7 жыл бұрын
damn this is confusing...
@sparshgupta8078
@sparshgupta8078 3 жыл бұрын
"promises allow you to do something as soon as an asynchronous method or action does finish instead of immediately returning the final value the asynchronous method returns a promise to supply the value at some point in the future" this point clears it all! damn so clear explanation
@ts8960
@ts8960 2 жыл бұрын
makes 0 sense dude
@ACantarela2
@ACantarela2 7 жыл бұрын
I'm loving these JS videos, even more Beau faces in the thumbnails haha
@KreativeHogwartsLegacyGUIDES
@KreativeHogwartsLegacyGUIDES 5 жыл бұрын
the more complex the idea, the harder it is to understand the beau teaches java videos. earlier videos with easy concepts were some of the best videos ive seen on the worst internet, and im not exaggerating.
@sasayaki
@sasayaki 6 жыл бұрын
I came to KZfaq to try and understand promises better after my class sort of confused me. I'm trying to get as many different explanations as I can to see if one of them works for me. This was a good start on the syntax so thanks!
@kaypakaipa8559
@kaypakaipa8559 6 жыл бұрын
Great explanation was so confused watching other videos. The Thumbnails are killer tho😂
@hikiyo13
@hikiyo13 7 жыл бұрын
I love those tutorials so much
@sweeball
@sweeball 7 жыл бұрын
Thanks for getting me here. This vid. has been very helpful!
@abdelrahman2348
@abdelrahman2348 6 жыл бұрын
so if it's resolved then will executed and if not resolved or rejected catch will execute ? is that its logic ?
@dannyiskandar
@dannyiskandar 6 жыл бұрын
thank you this really help clarify this concept ..promises ..promises ..ohh how can they be ..yeah :)
@anag2125
@anag2125 4 жыл бұрын
Love all your videos. Thank u so much!!! :D
@Anbualex
@Anbualex 7 жыл бұрын
OMG this may have made my JS game work better. Awesome!!
@tasoulman
@tasoulman 6 жыл бұрын
I think it is easier to user the fetch API. Am I wrong ?
@worldbosspf1
@worldbosspf1 7 жыл бұрын
thanks man I now understand this.
@theluanvuong5886
@theluanvuong5886 7 жыл бұрын
So, guys, when are the React and SASS courses come out ?
@BeauCarnes
@BeauCarnes 7 жыл бұрын
I am planning on doing React. No plans for SASS as of yet since right now I'm just focussing on JavaScript.
@oolumee
@oolumee 5 жыл бұрын
When will be the time I can finally use my code not for good.
@denoise_
@denoise_ 7 жыл бұрын
These thumbnails are turning into a Javascript horror movie.
@kaypakaipa8559
@kaypakaipa8559 6 жыл бұрын
Illicit Industries 😂😂i tried to stay away from this video as much i could soon as i saw the thumbnail, but seems every other video left even more confused on wat promises are. Funny enough this guy explained well enough to get the concept.
@ahmadabdolsaheb
@ahmadabdolsaheb 7 жыл бұрын
I'm here for the faces :)
@BeauCarnes
@BeauCarnes 7 жыл бұрын
😄 😁 😆 😴 🙄 🤔😋 😜 😝
@thenecroyeti1
@thenecroyeti1 7 жыл бұрын
The ordering of this series is a little off. Teaching switch statements then promises?! I bit of a leap there...
@BeauCarnes
@BeauCarnes 7 жыл бұрын
That's just to keep things interesting for me. Eventually I hope to have a complete JavaScript series. Check this forum for the plan and to offer suggestions: forum.freecodecamp.com/t/topic-suggestions-for-beau-teaches-javascript-on-fcc-youtube-channel/89344/3
@randomdeveloper6456
@randomdeveloper6456 7 жыл бұрын
Beau Carnes May I use your videos as reference to start a portuguese (my Native Lang) teaching channel ? I like the idea of learn teaching.
@naruto5437
@naruto5437 7 жыл бұрын
this was great...
@jarrettklink4097
@jarrettklink4097 7 жыл бұрын
I guess I'm a tiny bit confused. Where would you use this? As in, what situation?
@grandpowr
@grandpowr 6 жыл бұрын
When you need to work on Asynchronous type of situations (like the final project Simon's Game). They're actually very useful because you can control with .then() how your code will work and can catch an error as well. If you still have issues then read the book "You Don't Know Javascript" they explain Promises and in which situations you use it.
@andrewkiminhwan
@andrewkiminhwan 7 жыл бұрын
Im a fan Beau! and your slight boston accent?
@BeauCarnes
@BeauCarnes 7 жыл бұрын
Actually I've lived in Michigan most my life. Some people have said I have an accent, though. I'm not sure where it is from. 😄
@BikesNotDrugs
@BikesNotDrugs 7 жыл бұрын
Beau Carnes same problem I have. Apparently I have an accent and I've lived in Utah my whole life.
@hpineroo
@hpineroo 7 жыл бұрын
This can be a way that several web services uses for 'undo' buttons work?
@herolivesnu
@herolivesnu 2 жыл бұрын
let doWhat=new Promise((resolve,reject)=>{ let multiply=(x,y)=>x*y add=(a,b)=>a+b arr=[1,2,3]; if(arr.length>1) resolve(add((multiply(5,6),10))); reject("sorry there is a mistake") } ) doWhat.then(result=>console.log(result)) doWhat.catch(err=>console.log(err)) /* I want to log 40 on the console with the above code, pls help by telling me what is wrong with the code*/
@pradipta9345
@pradipta9345 3 жыл бұрын
Beautiful ❤️
@ekkehardehrenstein180
@ekkehardehrenstein180 6 жыл бұрын
Those promise example videos lack creativity and as a consequence don't make it very clear.
@eliweber2542
@eliweber2542 3 жыл бұрын
You can’t use a word within its own definition...
@novanoskillz4151
@novanoskillz4151 2 жыл бұрын
Love your explanations… but i think you chose the most confusing example possible to explain promises.
@alainleclerc4523
@alainleclerc4523 3 жыл бұрын
very confusing...
@aaronargottelopez3488
@aaronargottelopez3488 4 жыл бұрын
DAnke
@ts8960
@ts8960 2 жыл бұрын
terrible explanation
Desktop Notifications - Beau teaches JavaScript
4:30
freeCodeCamp.org
Рет қаралды 24 М.
THIS keyword - Beau teaches JavaScript
8:48
freeCodeCamp.org
Рет қаралды 57 М.
ПРОВЕРИЛ АРБУЗЫ #shorts
00:34
Паша Осадчий
Рет қаралды 6 МЛН
A teacher captured the cutest moment at the nursery #shorts
00:33
Fabiosa Stories
Рет қаралды 7 МЛН
Русалка
01:00
История одного вокалиста
Рет қаралды 7 МЛН
Comparison Operators & If Else - Beau teaches JavaScript
6:26
freeCodeCamp.org
Рет қаралды 22 М.
Functions - Beau teaches JavaScript
7:18
freeCodeCamp.org
Рет қаралды 68 М.
Javascript Promises vs Async Await EXPLAINED (in 5 minutes)
5:50
Roberts Dev Talk
Рет қаралды 564 М.
Germany | Can you solve this ? | Math Olympiad  (x,y)=?
11:02
Learncommunolizer
Рет қаралды 5 М.
What are JavaScript PROMISES? 🤞
12:37
Bro Code
Рет қаралды 48 М.
Closures - Beau teaches JavaScript
4:48
freeCodeCamp.org
Рет қаралды 74 М.
JavaScript Promises for Complete Beginners
14:54
Codevolution
Рет қаралды 66 М.
JavaScript Promises In 10 Minutes
11:31
Web Dev Simplified
Рет қаралды 1,7 МЛН
ПРОВЕРИЛ АРБУЗЫ #shorts
00:34
Паша Осадчий
Рет қаралды 6 МЛН