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 .
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?
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.
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.
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) ??
Webhook ke uper video banaiye. Basically demo me ye dikhaiye ki phonepe payment gateway ko kaise react and node.js me integrate kar sakte hai aur payment complete hone ke baad form data ya cart data ko mongodb me kaise save kar hai webhook ki help se. Payment gateway ke liye razorpay use mat ki jiye only phonepe payment gateway.
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!!
How can you say this line ? Arrow function jo hota hai wo hamesha global object ko point krta hai?? 30:19 don't use word hamesha sir in your example its pointing to global, doesnt mean hamesha krega, arrow fn does not has its own this, and its points to it parent lexical scope where it presents in , in you case its present in global scope thats why its pointing to global object , and for browsers global object is Window object, thats why we get window,
If "this" in browser is pointing to window, then window has variable fullname right? So in browser the output of this line should be "Piyush Garg". Correct me if I am wrong?
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 🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏
Hi piyush, I have doubt at 31:53 why the IIFE is returning undefined .Pls explain if anyone else can i will appreciate.What's this keyword points to in IIFE
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
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!
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
20:00
24:28
27:39 : 30:00 arrow fn refers to global context or window (for browser) for 'this'
32:30
35:15
tutorial of kubernetes for node js and helm
helm means
@@raashidmanzoor520 google karle yar :)
❤
Please continue this series Interview questions like React, Node, sys design, etc...
Bhai aap sahi ja rahe ho, kuch log difficult questions puchake demotivate kar dete hai UA-cam pe.
done and great work by @Piyush Garg.
Thanks for such a wonderful video Piyush.
Sir you are just awesome. Thank you very much for your time and knowledge.
every one should watch this video after learning javascript
Best teacher in coading industries......👍
so many thing learned today thanks for this amazing session.
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.
halfway through the video, learned so much
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
Great job Piyush, The questions are good but the explanations are gold 🔥
My score 9/10🎉 can you please continue this series it's very interesting and helping for me
Great Explanation of these important concepts of javascript👏
great explanation and u have given crystal clear every concept behind this question, please come up with more videos on javascript and react also
call aur bind function kya badiya explain kiya bhaiya!aur further series continue kariye bhaiya!
Thanks bhaiya learnt alot 😊
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
Definitely i am gonna like and share this amazing vdo .
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'] }
Thank yo sir, it was my first video, and you killed it great !!!
Very nice explanation sir, Thank you!
Thank you sir, is type ke dusre question bhi btaiye interview ke liye. Your explanation types is very good
need a part 2 please it is very helpful so much helpful
This is a goldmine, keep spreading this invaluable gold
bhai aur chahiye aise videos. thanks for this one.
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!
Thank you Piyush bhaiya for this amazing series.😊
Great explanation. Really nice the way you explain all questions. 🎉🎉🎉
Best video i have watched so far bro to get the concept of hoisting and memory and Cody thing
Thank you
Bro your knowledge is next level🎉🎉
the core learning for me was js execution environment...confusion clear
Your way of teaching is superb, Please make intermediate and high level interview questions and lastly thanks for this amazing video.
This is my first comment so far please make advanced javascript interviews questions. You are awesome teachers so far I watched. ❤❤
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.
thank you ,u made it very easy to understand
Excellent Teaching! :)
Need more interview question like this. Thank you Piyush.
it was fruitful video!! but U can go in more deeper to make understand ...
What a video!! Totally worth to watch
Need more stuff like this
so many things to learn
Thank you @piyush
Maja aa gaya dost...aur video banao...banao banao..
I have a doubt 13:21 jab myfun(second) bhi to intialize hona chahiye tha but output first kese aaya
Nice set of questions.
Nice video, Piyush bhai! Please continue the series on interview questions related to React, Node, system design, etc.❤
Amazing video as always, please do continue the JavaScript interview questions series.
Loved it. Need more like this. Piyush Bhai start a interview js series. Me and my friends will love it.
thankx piyush more videos of similar kind needed.
this video is awesome for revising javascript concept , waiting for another video with hard questions...
What an explanation 👏
Thanks a lot sir..❤
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...
Webhook ke uper video banaiye. Basically demo me ye dikhaiye ki phonepe payment gateway ko kaise react and node.js me integrate kar sakte hai aur payment complete hone ke baad form data ya cart data ko mongodb me kaise save kar hai webhook ki help se. Payment gateway ke liye razorpay use mat ki jiye only phonepe payment gateway.
0:53 value of Age is undefined
value of Age is 20
sir continue this series . we need more videos like it
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!!
Excellent!
Thank you it was very helpful.
Great questions, Learned a lot
How can you say this line ? Arrow function jo hota hai wo hamesha global object ko point krta hai?? 30:19 don't use word hamesha sir
in your example its pointing to global, doesnt mean hamesha krega,
arrow fn does not has its own this, and its points to it parent lexical scope where it presents in , in you case its present in global scope thats why its pointing to global object , and for browsers global object is Window object, thats why we get window,
If "this" in browser is pointing to window, then window has variable fullname right? So in browser the output of this line should be "Piyush Garg".
Correct me if I am wrong?
Sir, u are a legend ❤
Excellent work, need intermediate and hard level 10 questions each please... #my_christmas_gift😂
I love you bro. I am getting confidence from watching your videos. Please make a video on Design patterns with nodejs classes examples.
Please do for nodejs as well as backend in general
sir awsome questions can you made on react js
more of this type with great explanation
Thank you for your efforts!
great video piyush
🔥 Awesome. Thank you!
Please sir make video on kubernetes if possible !!
awesome explanation 😍😍
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 🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏
Thank you so much sir this was so helpful ❤❤
Nice work Piyush :)
9th was the mind blowing.
Good video and best explanation
Appreciated sir please make a video on "HOW TO SECURE OUR FRONTED & BACKEND CODE IN WEB DEVELOPMENT"
Piyush ek nodejs ke upar bhi banao esi video
Please provide us interview questions for HTML and CSS also. It would be very helpful if you would include MCQs also.
Nice explanation ❤❤❤
Nice explanation bro, ❤
love your videos they are very informative :)
Hi Piyush
'this' in arrow function donot refers to Global/Window object, it refers to the context where it is being called.
Nicely Explained🙌😍🚀
Very useful thank you😊🙏
Loved it bhaiya ❤❤
great explanation
very good bro please make more harder
hats off bro 😎
Loved this💯
Hi piyush,
I have doubt at 31:53 why the IIFE is returning undefined .Pls explain if anyone else can i will appreciate.What's this keyword points to in IIFE
Awesome video brother...
Shukriya Brother
38:14 how it is working with arrow function, didn’t get the closure logic