27:00 I think it is because of closures. When we use let keyword it creates scope of block i.e when the loop will be over than the variable created by let keyword "i" will be deleted but in between the loops block we have used an async function setTimeout in which a call back function is passed. and in the callback function we used a variable "i" of its parent scope in console log. so now it creates a closure in each iteration and saves its values than after it goes to web API environment one by one. so when all the execution is done within the loop than the async function is pulled back to the call stack through event loop. since each async function had captured the value of "i" in closures so it reflect in console log after execution. while in case of var keyword..... it is a global scope variable so it dose not delete though the loop has ended. So when async functions are puled back one by one to call stack via event loop they already had different closers value which were captured during iteration in variable "i" respectively but they get updated (re-assigned) to the last one because the value of "i" available in global scope. That is why it prints the same value i.e 10 ten times .
Great work man, thanks a lot! Really appreciate all the efforts :) Just one suggestion, if you could also give simple use cases after these interview answers, we'll be able to relate and understand better. Eg: where or why would one use Object.create etc.
very informative video. I am switching my career to web development form non it background. please keep making these kind of videos . really helpful to understand the concepts. hamare institutes mein bhi asie concepts clear nahi karate hain.
Hi Piyush, this video is just awesome and the way you described the concept easily. Kindly do bring the video on intermediate and hard questions. Desperatley waiting for it. A Fun fact, you have become one of the most famous youtuber in software field. Haha!!
31:00 Two doubts First one is : first line initializes fullname, so does this fullname doesnt become a part of global object?? Second one is : in case of iife does "this" doesn't refer to the current context?
In the video at 30.04 sec when we calling getFullnameV2 as a arrow function and in arrow function this belongs to global object .But in global object we have fullname property so why it don't pick the fullname from global object (From Global Execution Context) ??
piyush vaiya love you and love your content very much . ❤❤❤❤❤❤❤❤ please make a video on what to do and how to do if you stuck on development , stuck on error, if you haven't any senior developer and if anybody does n't help you, then how can we survive in a company as a fresher or 1-2 year exp ? because ye mere sath abhi ho raha he aur mera bht sare dost ke sath bhi hua he ye chiz aur wo sab 4-5 company switch kar chuke he alreday due to stucking problem , helpless and hope less , demotivate things like these... apke sath bhi hua hoga na ...app bhi to struggle kiye honge ne apka fresher time pe to please it's my kind request bataie 🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏
After watching this video, I feel that after the more than 4+ year working on JavaScript, it really there are lots of missing concept that blow my mind.
timestamps :
first question is from start
@9:55 2nd Q
@14:34 3rd Q
@18:25 4th Q
@24:25 5th Q
@27:36 6th Q
@32:19 7th Q
@35:12 8th Q
@38:24 9th Q
Thanks
thank you bro
Piyush is one of the best teachers! No BS about courses and giving false dreams and hope. Just to-the-point coding. Keep it up buddy
Wait why I quickly understood the abbreviation "BS" 🤔
great interview questions for JS , basic and very tricky questions
Learned so much in depth in just 40mins, quality matters❤love it
This almost covers all question which I got stuck in interviews when I was a beginner.
Bhai Can You Suggest Me,How To Get A Frontend Developer Job As A Fresher From Your Experience
Thank you. I bragged 2 jobs in top reputed MNCs. I have watched many videos of yours which helped me a lot.
27:00 I think it is because of closures. When we use let keyword it creates scope of block i.e when the loop will be over than the variable created by let keyword "i" will be deleted but in between the loops block we have used an async function setTimeout in which a call back function is passed. and in the callback function we used a variable "i" of its parent scope in console log. so now it creates a closure in each iteration and saves its values than after it goes to web API environment one by one. so when all the execution is done within the loop than the async function is pulled back to the call stack through event loop. since each async function had captured the value of "i" in closures so it reflect in console log after execution.
while in case of var keyword..... it is a global scope variable so it dose not delete though the loop has ended. So when async functions are puled back one by one to call stack via event loop they already had different closers value which were captured during iteration in variable "i" respectively but they get updated (re-assigned) to the last one because the value of "i" available in global scope. That is why it prints the same value i.e 10 ten times .
Thats correct!
tutorial of kubernetes for node js and helm
helm means
@@raashidmanzoor520 google karle yar :)
❤
Great work man, thanks a lot! Really appreciate all the efforts :)
Just one suggestion, if you could also give simple use cases after these interview answers, we'll be able to relate and understand better. Eg: where or why would one use Object.create etc.
great explanation and u have given crystal clear every concept behind this question, please come up with more videos on javascript and react also
done and great work by @Piyush Garg.
Please continue this series Interview questions like React, Node, sys design, etc...
This is my first comment so far please make advanced javascript interviews questions. You are awesome teachers so far I watched. ❤❤
Great explanation. Really nice the way you explain all questions. 🎉🎉🎉
20:00
24:28
27:39 : 30:00 arrow fn refers to global context or window (for browser) for 'this'
32:30
35:15
Great job Piyush, The questions are good but the explanations are gold 🔥
Great Explanation of these important concepts of javascript👏
Question tricki h but mazedar h mind fresh ho gya
Hey piyush!
Please share us the resources you use to learn.... otherwise we will fall in tutorial hell...
As usual your videos are mind-blowing...
+1. I want to know the collective resources to learn indepth abstract concepts like these.
Nice video, Piyush bhai! Please continue the series on interview questions related to React, Node, system design, etc.❤
Best teacher in coading industries......👍
Your way of teaching is superb, Please make intermediate and high level interview questions and lastly thanks for this amazing video.
Your way of explanations has helped me in so many projects , you are my go to guy whenever i want to learn something new ... Thank You Piyush Bhai
very informative video. I am switching my career to web development form non it background. please keep making these kind of videos . really helpful to understand the concepts. hamare institutes mein bhi asie concepts clear nahi karate hain.
hi there! how long have u been learning webdev... coz im also from non it bg and learning frontend for now!
call aur bind function kya badiya explain kiya bhaiya!aur further series continue kariye bhaiya!
Definitely i am gonna like and share this amazing vdo .
so many thing learned today thanks for this amazing session.
Best video i have watched so far bro to get the concept of hoisting and memory and Cody thing
Thank you
Sir you are just awesome. Thank you very much for your time and knowledge.
Hi Piyush, this video is just awesome and the way you described the concept easily. Kindly do bring the video on intermediate and hard questions. Desperatley waiting for it. A Fun fact, you have become one of the most famous youtuber in software field. Haha!!
Thank yo sir, it was my first video, and you killed it great !!!
Thank you sir, is type ke dusre question bhi btaiye interview ke liye. Your explanation types is very good
My score 9/10🎉 can you please continue this series it's very interesting and helping for me
Loved it. Need more like this. Piyush Bhai start a interview js series. Me and my friends will love it.
This is a goldmine, keep spreading this invaluable gold
What an explanation 👏
Thanks a lot sir..❤
Very nice explanation sir, Thank you!
Thanks for such a wonderful video Piyush.
I love you bro. I am getting confidence from watching your videos. Please make a video on Design patterns with nodejs classes examples.
I like your voice and the way of speaking {especially mixing Urdu and English [i am the fan of your sentence 'let us say that'] }
bhai aur chahiye aise videos. thanks for this one.
Amazing video as always, please do continue the JavaScript interview questions series.
Bhai aap sahi ja rahe ho, kuch log difficult questions puchake demotivate kar dete hai TH-cam pe.
Bro your knowledge is next level🎉🎉
Thank you Piyush bhaiya for this amazing series.😊
What a video!! Totally worth to watch
Need more stuff like this
Excellent Teaching! :)
Need more interview question like this. Thank you Piyush.
halfway through the video, learned so much
this video is awesome for revising javascript concept , waiting for another video with hard questions...
Excellent!
so many things to learn
Thank you @piyush
31:00 Two doubts
First one is : first line initializes fullname, so does this fullname doesnt become a part of global object??
Second one is : in case of iife does "this" doesn't refer to the current context?
same doubts i hve
@@moneylogyy it's because declaring something with var doesn't make it a part of global object. It becomes more like a part of the module
@@Arvind__-wu6zv thanks bro
Nice set of questions.
In the video at 30.04 sec when we calling getFullnameV2 as a arrow function and in arrow function this belongs to global object .But in global object we have fullname property so why it don't pick the fullname from global object (From Global Execution Context) ??
Yes in my system I get piyush in console...
Maja aa gaya dost...aur video banao...banao banao..
thankx piyush more videos of similar kind needed.
Thanks bhaiya learnt alot 😊
Thank you so much bhai. Amazing video
Must watch video. very informative. Please make a video on nodejs with docker and kubernates
with ci/cd
thank you ,u made it very easy to understand
Great questions, Learned a lot
every one should watch this video after learning javascript
piyush vaiya love you and love your content very much . ❤❤❤❤❤❤❤❤
please make a video on what to do and how to do if you stuck on development , stuck on error, if you haven't any senior developer and if anybody does n't help you, then how can we survive in a company as a fresher or 1-2 year exp ? because ye mere sath abhi ho raha he aur mera bht sare dost ke sath bhi hua he ye chiz aur wo sab 4-5 company switch kar chuke he alreday due to stucking problem , helpless and hope less , demotivate things like these...
apke sath bhi hua hoga na ...app bhi to struggle kiye honge ne apka fresher time pe to please it's my kind request bataie 🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏
After watching this video, I feel that after the more than 4+ year working on JavaScript, it really there are lots of missing concept that blow my mind.
great video piyush
need a part 2 please it is very helpful so much helpful
🔥 Awesome. Thank you!
more of this type with great explanation
sir i have a doubt like the first variable fullname isn't that available in global context ?
Thank you so much sir this was so helpful ❤❤
Please do for nodejs as well as backend in general
Thank you for your efforts!
Good video and best explanation
wow it was great video
great explanation
Thank you it was very helpful.
sir continue this series . we need more videos like it
Hi Piyush
'this' in arrow function donot refers to Global/Window object, it refers to the context where it is being called.
Nice explanation ❤❤❤
Nicely Explained🙌😍🚀
Very useful thank you😊🙏
Nice work Piyush :)
amazing 🥰👌
Sir, u are a legend ❤
awesome explanation 😍😍
We want machine coding round question video also❤❤
And thank you for this🎉😊
love your videos they are very informative :)
Great Info !!!
Loved it bhaiya ❤❤
Nice explanation bro, ❤
the core learning for me was js execution environment...confusion clear
Cool 😊
sir awsome questions can you made on react js
Nice explanation😊
Best! Keep posting
Loved this💯
Awesome 👌
Awesome video brother...
Excellent work, need intermediate and hard level 10 questions each please... #my_christmas_gift😂