HARDEST JavaScript Interview Question Ever! Part 1
ฝัง
- เผยแพร่เมื่อ 7 ก.ค. 2020
- Want to know when Advanced JavaScript Course releases exclusively on codedamn.com? Sign up on codedamn.com for free and I'll let you know with an email ;)
------------
Don't forget to subscribe and like the video if you enjoyed :)
Be a damner, join the coding community: codedamn.com
The Most Underrated Video I've ever seen. Dude, this video should be the best suggestion for understanding the event-loop of JS.
Great one! that let you really understand how the call stack works, thanx for your work.
Great explained! Thanks so much !
WOO HOOO got it right at first haha even though I have never focused on advanced concepts, tutorial was very informative, now I know how it works, thankss a lot
One of the Best explanation for event loop and the BGM is awesome
Very nice explanation.
Thank you very much!!
Loved it well explained!!!!
Is there a part 2 for this video?
Great one BTW
Very nice explanation bro :)
Excellent explanation!
Great ...u deserve more 🙏🙏
wow that was an awesome explanation.
This was a cool lesson, but I wrote down how it would go before watching the video and it's pretty simple if you understand how setTimeout works/event queue in javascript. Really good book helping me out was secrets of the javascript ninja 2nd edition, recommend it for anyone with some javascript experience.
Cool, thanks!
great video great music too
That was spectacular
Really nice explanation
Thi was wonderful brother
The video was very insightfull ... background sound reminded me of movie Fight Club
Excellent!
This is gold.
That was good!
THis is so good man..epic shit
thank you sir, nice video
background music suites best for the question 😂 😂 😂 😂
Scary sci-fi alien music
I knew it from started, btw i have taken jonas schmedtmann course from udemy and other online sources, am so happy that i knew the answer
Jonas's course was amazing, in my opinion as a new programmer
great video, there is no part 2 i think
great explanation! , the core idea was when the call stack is empty and something is in microstask it will pick the microtask as it has higher priority than task queue even if synchronous function is waiting to be executed. Correct me if Iam wrong
no after all synchronous code finished execution then only microtask and task gets executed
10:23 is the most important thing is event loop will finish all microtaskqueue in one go whereas after each taskqueue execution it will re-run whole cycle again.First it was confusing to me show I am writing it here correct me if I am wrong. Thanks Mehul bhai.
Thank you Mehul 🙏
HARDEST part about this video was the explanation, which I ended up skipping. If you're the same,JUST RELAX YOU'RE DOING GOOD
Awesome!!!
Thank you bhai!
Perfect !!!
Awesome 👏
You are my hero
That's very good
Thanks bro
Where is part #2?
My browser prints different order than video shows at 3:58, why is that?
#1 main thread
#2 main thread
#1 promise 1
#2 promise 1
#1 timeout 1
#1 timeout 2
#1 promise 2
#2 timeout 1
#2 timeout 2
#2 promise 2
which browser do you use? I predicted what you have mentioned here, and was surprised to see a different output
You are right. This is the correct output. He’s explanation is sketchy for me.
where is part 2 of this video ????
Where is part 2?
Where do you learn this stuff?
Yay I got it correct!!!
Bhai like to Banta hai tuze ek
Who puts music in tutorial videos?. and btw the output might differ on different browsers.
I m your Fan Bro 😅
why line 6 is before line 18, can you explain that pls
Im pretty sure 18 will print first then 6. Im not sure why this snippet printed out the 6 before 18. I checked in my browser. Promise will always print after the main thread is empty. Not the local execution context empty.
Don't add the music in the next video! Btw, nice work.
Sounds good! (pun). On a serious note, sure, I’ll keep that in mind
@@codedamn I enjoyed it. It's different and gives a cool vibe. don't write the whole idea off ;-)
Please dont add background music. It is really distracting .
If we call functions like below then output is different. Can you please explain that?
listener1();
listener2():
Here I am not adding event. Directly calling 2 functions one by one.
It's because here in the video, the function are callbacks which get pushed to task queue on click event where as when you call the function directly, it gets pushed to call stack
best explanation
Line 18 should print before line 6. How come promise prints before main thread is empty?
promise stay in microtask and callstack will execute microtask before taskqueue
cause listener itself is a callback func so the 2 listener func first go to taskqueue and not callstack, and once listener1 executes it pushes some stuff in microtask queue which gets picked by JS before the listener2 waiting in taskqueue is picked up.
Why music ....?
I do not understand why there is need of louder irritating background music. It is not necessary, your content is good that real learner will get benefit from.
I’m sorry if the music was too loud, would make sure to tune it down next time
Hard to follow with the loud music....
wow
90% music 10% voice 😑
easypez
Remove the background sound it is annoying!
music is disturbing.please remove it
Terrible and unnecessary
background music. The video is great but the BGM is soooo annoying and why was it even needed.
Worst vdo due to music, people should listen your voice or music ?
who on the face of earth puts dumb music in tutorial videos. The student tries to focus on concept not how cool your bgm is