Javascript Nuggets - Promises Example

  Рет қаралды 18,218

Coding Addict

Coding Addict

3 жыл бұрын

Javascript Nuggets - Promises
Source Code - github.com/john-smilga/javasc...
Project Based Web Dev Courses
www.johnsmilga.com/
Products I Use:
Microphone - Shure SM7B - amzn.to/3fX55aD
Headphones - Shure AONIC 50 - amzn.to/3zbkxHC
Desk-Mounted Microphone Stand - amzn.to/3x3MBuS
Crossover - dbx 234s - amzn.to/3xcryGC
Audio Interface - Focusrite Scarlett 2i2 3rd Gen - amzn.to/3pt1wMx
Cheaper Microphone (My first mic) - Blue Yeti USB Mic amzn.to/3iliwTm
Blue Light Blocking Glasses - amzn.to/3fZASrv
Apple MacBook Pro 13.3" - amzn.to/3z5QDEK
iMac - amzn.to/3glWmOe
Second Monitor - LG 4K UHD 27UD88 - amzn.to/3ckdwdV
Wifi Router - TP-Link AC1900 - amzn.to/34ZSddz
Desk Chair - amzn.to/3ikNbQJ
Standing Desk - amzn.to/3zdKVAJ
Books I Recommend:
The Subtle Art of Not Giving a F*ck - amzn.to/3v9t8Yi
The Tipping Point - amzn.to/3gCslKj
Atomic Habits - amzn.to/3x52xNa
12 Rules for Life - amzn.to/3gln8pN
Deep Work - amzn.to/3cyAgqu
Digital Minimalism - amzn.to/3gao69A
A World Without Email - amzn.to/351Swoe
Rich Dad Poor Dad - amzn.to/3v8RWQ6
Rich Dad's Cashflow Quadrant - amzn.to/3ivt1Uk
Check out My Amazon Store for more products and books recommendations - www.amazon.com/shop/codingaddict
Disclosure: This video is not sponsored. Some links above are affiliate links, and l may earn a small commission from any purchases at no additional cost to you. Thank you for supporting my channel!

Пікірлер: 32
@CoderDmitri
@CoderDmitri 3 жыл бұрын
John Smilga for president!
@codelery414
@codelery414 2 жыл бұрын
Well, if John Smilga gives an explanation on something, understanding is guaranteed. Thanks for another demystification.
@udaysharma444
@udaysharma444 3 жыл бұрын
Best ever explanation
@faycal7929
@faycal7929 2 жыл бұрын
it's like callback hell ... but in a fancy way!
@mollenbu77
@mollenbu77 2 жыл бұрын
It's promise hell
@MIDNightPT4
@MIDNightPT4 2 жыл бұрын
Gifted teacher… Thanks!!
@CodingAddict
@CodingAddict 2 жыл бұрын
Glad it was helpful!
@juicetheballer
@juicetheballer 2 жыл бұрын
I appreciate all these videos
@Jacksons_are_jackson
@Jacksons_are_jackson 7 ай бұрын
brillant teacher omg
@sohamvishwas6795
@sohamvishwas6795 2 жыл бұрын
Thank you for sharing your knowledge
@my_vk_vlogs
@my_vk_vlogs 3 жыл бұрын
Nice video to understand the promise
@codex8797
@codex8797 2 жыл бұрын
Nice bro.
@ozankurucu6261
@ozankurucu6261 9 ай бұрын
Thanks
@AhmedIbrahim-fi2so
@AhmedIbrahim-fi2so 3 жыл бұрын
ooo thanksss ❤️❤️❤️
@CodingAddict
@CodingAddict 3 жыл бұрын
Welcome 😊
@saulchipwayambokoma3213
@saulchipwayambokoma3213 Жыл бұрын
My headings are still going ahead at their pre-set times. they are not waiting for the previous one to carry out it's action first
@AhmedIbrahim-fi2so
@AhmedIbrahim-fi2so 3 жыл бұрын
i think i know how to do that 🤓🤓🤓 ! we can say resolve ( data ) in the finctio ! and then each time .. we pass the next color in the parameter of ( then ) ! as a data ... then inside the (then ) we pass the data insted of the color argument
@anatutech
@anatutech Жыл бұрын
This looks like Promise Hell to me.😁
@virusnetic
@virusnetic 8 ай бұрын
It's actually not because we don't have rewrite the same functionalities again and again we can simply call an function for that
@ramborb8795
@ramborb8795 2 жыл бұрын
Can somebody tell me, on MENU project, why the border on the filter buttons have the border color left and up gold and right and down black ? I inspected the buttons, I changed the colour, but still half has a darker colour that the other. Thank you
@ramborb8795
@ramborb8795 2 жыл бұрын
Sorry, I asked the question at wrong video. I had the videos in a playlist and a new video started
@4t196
@4t196 2 жыл бұрын
At 11:50 line 14, the last call off addColor didn’t receive the 4th parameter "data". Doesn’t JavaScript complain about this?
@Han-ve8uh
@Han-ve8uh 2 жыл бұрын
Mismatch between interface of javascript parameters and arguments passed are fine. Extra arguments are ignored, missing arguments are set to undefined if no defaults setup
@rentalabharadwaja8013
@rentalabharadwaja8013 2 жыл бұрын
Can't we do the same functionality without promise , only with setTimeout??
@virusnetic
@virusnetic 8 ай бұрын
yes you can but then it will be a callback hell
@anandoganiya9070
@anandoganiya9070 3 жыл бұрын
In .then( ) if you don't callback and directly invoke the addColor( ) then even after commenting out resolve the program works fine ,why is that happening?
@lamb8086
@lamb8086 3 жыл бұрын
The program didn’t work fine. Once he commented out the resolve, addColor only worked the first time it was called and never made it to the first .then(). He said if you console.log you would see that the promise would still be pending.
@anandoganiya9070
@anandoganiya9070 3 жыл бұрын
@@lamb8086 you didn't get my point
@anandoganiya9070
@anandoganiya9070 3 жыл бұрын
@@fugitivemind87 it gets invoked after you trigger the event ,nothing is change only i invoke the function inside .then( ) like .then( addColor( parameters...) ) , that mean even after commenting resolve .then( ) gets executed; it proves that it does not depend on resolve( ) call but yeah the state is still pending;
@CodingAddict
@CodingAddict 3 жыл бұрын
Program does not work fine, check the sequence. And the reason for that is because with your suggested setup we invoke addColor(params) right away instead of passing as callback. .then(addColor(params), if you will pass it as a reference .then(addColor), you will see that while the promise is pending it's not going to be invoked.
@anandoganiya9070
@anandoganiya9070 3 жыл бұрын
@@CodingAddict no it works I run the code
Javascript Nuggets - Async / Await
16:46
Coding Addict
Рет қаралды 24 М.
Javascript Nuggets - Promises
13:28
Coding Addict
Рет қаралды 24 М.
KINDNESS ALWAYS COME BACK
00:59
dednahype
Рет қаралды 151 МЛН
WHAT’S THAT?
00:27
Natan por Aí
Рет қаралды 6 МЛН
Русалка
01:00
История одного вокалиста
Рет қаралды 6 МЛН
Javascript Nuggets - Reduce (object example)
18:48
Coding Addict
Рет қаралды 33 М.
Practical Typescript 9 - Tasks App
42:18
Coding Addict
Рет қаралды 1,1 М.
Mastering Cold Calling in 2024
9:11
Bri Galarza
Рет қаралды 171
Redis Crash Course
27:31
Web Dev Simplified
Рет қаралды 605 М.
Practical Typescript 2 - Objects and Functions
59:33
Coding Addict
Рет қаралды 2 М.
Javascript Nuggets - Callback Functions
13:00
Coding Addict
Рет қаралды 23 М.
Javascript Nuggets - Filter and Find
15:14
Coding Addict
Рет қаралды 33 М.
Practical Typescript 4 - Tuples and Enums
56:34
Coding Addict
Рет қаралды 1,1 М.
KINDNESS ALWAYS COME BACK
00:59
dednahype
Рет қаралды 151 МЛН