No video

Javascript Nuggets - Promises Example

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

Coding Addict

Coding Addict

Күн бұрын

Javascript Nuggets - Promises
Source Code - github.com/joh...
Project Based Web Dev Courses
www.johnsmilga...
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...
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
@codelery414
@codelery414 2 жыл бұрын
Well, if John Smilga gives an explanation on something, understanding is guaranteed. Thanks for another demystification.
@CoderDmitri
@CoderDmitri 3 жыл бұрын
John Smilga for president!
@udaysharma444
@udaysharma444 3 жыл бұрын
Best ever explanation
@MIDNightPT4
@MIDNightPT4 2 жыл бұрын
Gifted teacher… Thanks!!
@CodingAddict
@CodingAddict 2 жыл бұрын
Glad it was helpful!
@Jacksons_are_jackson
@Jacksons_are_jackson 9 ай бұрын
brillant teacher omg
@faycal7929
@faycal7929 3 жыл бұрын
it's like callback hell ... but in a fancy way!
@mollenbu77
@mollenbu77 2 жыл бұрын
It's promise hell
@juicetheballer
@juicetheballer 2 жыл бұрын
I appreciate all these videos
@my_vk_vlogs
@my_vk_vlogs 3 жыл бұрын
Nice video to understand the promise
@sohamvishwas6795
@sohamvishwas6795 2 жыл бұрын
Thank you for sharing your knowledge
@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
@codex8797
@codex8797 2 жыл бұрын
Nice bro.
@ozankurucu6261
@ozankurucu6261 11 ай бұрын
Thanks
@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
@AhmedIbrahim-fi2so
@AhmedIbrahim-fi2so 3 жыл бұрын
ooo thanksss ❤️❤️❤️
@CodingAddict
@CodingAddict 3 жыл бұрын
Welcome 😊
@anatutech
@anatutech Жыл бұрын
This looks like Promise Hell to me.😁
@virusnetic
@virusnetic 10 ай бұрын
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 3 жыл бұрын
Can't we do the same functionality without promise , only with setTimeout??
@virusnetic
@virusnetic 10 ай бұрын
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 жыл бұрын
@@fugitivemind 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 М.
Before VS during the CONCERT 🔥 "Aliby" | Andra Gogan
00:13
Andra Gogan
Рет қаралды 10 МЛН
🩷🩵VS👿
00:38
ISSEI / いっせい
Рет қаралды 27 МЛН
Ik Heb Aardbeien Gemaakt Van Kip🍓🐔😋
00:41
Cool Tool SHORTS Netherlands
Рет қаралды 9 МЛН
Javascript Nuggets - Rest Operator
11:30
Coding Addict
Рет қаралды 16 М.
Generics: The most intimidating TypeScript feature
18:19
Matt Pocock
Рет қаралды 172 М.
Why High Performers Might Be Hurting Your Team
6:42
Simon Sinek
Рет қаралды 10 М.
Javascript Nuggets - Reduce (object example)
18:48
Coding Addict
Рет қаралды 33 М.
Javascript Nuggets - Array.from
16:52
Coding Addict
Рет қаралды 23 М.
When RESTful architecture isn't enough...
21:02
Dreams of Code
Рет қаралды 272 М.
Async JS Crash Course - Callbacks, Promises, Async Await
24:31
Traversy Media
Рет қаралды 1,4 МЛН
Vite Crash Course | Faster Alternative To CRA
16:24
Traversy Media
Рет қаралды 198 М.
Javascript Nuggets - Fetch Errors
7:11
Coding Addict
Рет қаралды 11 М.
Before VS during the CONCERT 🔥 "Aliby" | Andra Gogan
00:13
Andra Gogan
Рет қаралды 10 МЛН