Most Asked JavaScript Interview Questions | SetTimeout & EventLoop | JS Interview Series

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

Career With Gaurav

Career With Gaurav

Күн бұрын

Most Asked JavaScript Interview Questions | SetTimeout & EventLoop | JS Interview Series | Newton School
Let's start building project for practice.
⬇️ Download source codes - t.me/webdevelo...
#CSS #HTML #webdevelopment #newtonschool
Subscribe | Like | Comment
------------------------------------------------------------------------------------------------------------------------
Newton school is an online Edtech company providing the highest-rated FULL STACK DEVELOPMENT PROGRAM for professionals, graduates, and women.
NEWTON SCHOOL is your gateway to a high-paying tech career in 6 months with Zero fees till placement, transforming you into a rockstar full-stack developer earning 5-40 Lakh per annum salary. Newton School’s students are already working in more than 150+ top Indian companies, including Zomato, Unacademy, #Deloitte , #Nutanix , etc.
To watch more videos on programming, Data Structures, Android Development, Data Science, C++, Java, React, subscribe to our channel.
Do visit Newton school Launchpad through: www.newtonscho...
Subscribe | Like | Comment
Follow Newton School on
Facebook: / newtonschool.co
Instagram: / newtonschoolofficial
Linkedin: / mycompany
------------------------------------------------------------------------------------------------------------------------
Connect with me :
Dev Portfolio: gauravghai.dev/
Linkedin: / gauravvghai
Instagram: / gauravvghai
To stay updated with my youtube videos & quality content for web development -
/ htmlhints
#PracticeProject #Project #Highlight

Пікірлер: 34
@adityagautam1217
@adityagautam1217 Жыл бұрын
Those who are trying to understand this might help: the for loop will complete all iterations before any of the setTimeout functions are executed because setTimeout is an asynchronous function . As a result, the value logged for i in all three iterations will be 3. if we change var to let, output will be 0,1,2 because in case of let a new block scope is created for each iteration of the loop. This means that each iteration of the loop will have its own separate lexical environment and its own distinct value whereas in case of var, it does not create a new block scope, there is only one i variable shared across all iterations of the loop as var is function scoped.
@shagunjaiswal3403
@shagunjaiswal3403 7 ай бұрын
video se jada acha tummhare code ne samjha diya
@RajYadav-yh7vv
@RajYadav-yh7vv 2 жыл бұрын
worst incomplete poor explanation of event loop and bro toda normal raho aur dialogue toda kam kiya karo
@parth1450
@parth1450 2 жыл бұрын
I am still waiting for your exact explanation.. Bhai tho slow details me bana do video..tho acha hoga .. Ye video kab shuru hoke khatm hua pata hi nai chala.. This is genuine feedback don't take it otherwise 👍
@careerwithgaurav
@careerwithgaurav 2 жыл бұрын
Hi, Sure have noted dow will make video on this again soon in JS series for beginners which is currently in progress.
@buggplayer2301
@buggplayer2301 Жыл бұрын
true and lesss content and more promotion
@animeshdey6289
@animeshdey6289 2 жыл бұрын
Callstack works on LIFO not FIFO
@BhaveshBarskar
@BhaveshBarskar Жыл бұрын
another way to get desired result is to - change var to let it will print 0,1,2
@techupdate03
@techupdate03 2 жыл бұрын
Use let instead of var.. output will be 0,1,2
@FreeSkypeGenerator1
@FreeSkypeGenerator1 2 жыл бұрын
thanks for the pointer
@mohakmaheshwari8756
@mohakmaheshwari8756 Жыл бұрын
interviewers don't let you change it two let and const , self calling function is the only way
@fatimaiqra2169
@fatimaiqra2169 25 күн бұрын
thanks
@ambupadamuduli3794
@ambupadamuduli3794 2 жыл бұрын
Thanks for this.we want more questions like this
@jagadishprasad4142
@jagadishprasad4142 8 ай бұрын
not working, throwing error while executing online jscompiler
@jagadishprasad4142
@jagadishprasad4142 8 ай бұрын
for(var i=0; i
@PURRAHARAAMI
@PURRAHARAAMI 2 жыл бұрын
kya smjhaya bhai tune??? kuch smjh nhi ayaa
@bromptonhorsing8597
@bromptonhorsing8597 2 жыл бұрын
Why do you use English title and then speak another language in the video?
@ravikumarchaudhari1606
@ravikumarchaudhari1606 2 жыл бұрын
thank you for this osm video
@imkir4n
@imkir4n Жыл бұрын
u earned my sub,thank u
@mohakmaheshwari8756
@mohakmaheshwari8756 Жыл бұрын
two times i got this function that fucked up my interview
@RohitSharma-iq8ne
@RohitSharma-iq8ne 2 жыл бұрын
sir var ki jgh let krne pr 012 answer kiyo a rha he
@BhaveshBarskar
@BhaveshBarskar Жыл бұрын
because "let" keyword is blocked scoped, so for every iteration value of new copy of i is passed to closure function i.e setTimeout().
@girishpandey2936
@girishpandey2936 2 жыл бұрын
thanks sir
@misterl8129
@misterl8129 2 жыл бұрын
damn, dont understand the language
@sachinsharma1755
@sachinsharma1755 2 жыл бұрын
bhai interviewer kya sochega usse chodo wo btao jo tum soch rha hao, uske dimaag mai rhen do ki wo kya puchega
@parth1450
@parth1450 2 жыл бұрын
😂😂
@codewithkaran8860
@codewithkaran8860 2 жыл бұрын
1 question answer is 333
@prasandeep6999
@prasandeep6999 10 ай бұрын
Bhai kya bolna chaha raa hai? Jaldi Bol Kal Subah Panvel Nikalna Hai...
@petvinnie
@petvinnie Жыл бұрын
3
@amarnathmishra8697
@amarnathmishra8697 10 ай бұрын
Galat maat batao bhai its discouraging!!
@jaysinghsolanki7094
@jaysinghsolanki7094 2 ай бұрын
Abe mere bhai explain toh kya bakwaas youtuber hai
@adityagautam1217
@adityagautam1217 Жыл бұрын
not a good explaination
@bhaveshgupta7736
@bhaveshgupta7736 Жыл бұрын
10min waste kr die mere
@patilrahul515
@patilrahul515 Жыл бұрын
Rude..
How do Cats Eat Watermelon? 🍉
00:21
One More
Рет қаралды 12 МЛН
Good teacher wows kids with practical examples #shorts
00:32
I migliori trucchetti di Fabiosa
Рет қаралды 6 МЛН
JavaScript Visualized - Event Loop, Web APIs, (Micro)task Queue
12:35
JavaScript Event Loop: How it Works and Why it Matters in 5 Minutes
7:20