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 .
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?
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.
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 🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏
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) ??
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?
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
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.
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
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
Please continue this series Interview questions like React, Node, sys design, etc...
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!
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 :)
❤
great explanation and u have given crystal clear every concept behind this question, please come up with more videos on javascript and react also
every one should watch this video after learning javascript
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.
Great job Piyush, The questions are good but the explanations are gold 🔥
done and great work by @Piyush Garg.
Great Explanation of these important concepts of javascript👏
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
My score 9/10🎉 can you please continue this series it's very interesting and helping for me
Your way of teaching is superb, Please make intermediate and high level interview questions and lastly thanks for this amazing video.
Best teacher in coading industries......👍
Sir you are just awesome. Thank you very much for your time and knowledge.
Nice video, Piyush bhai! Please continue the series on interview questions related to React, Node, system design, etc.❤
halfway through the video, learned so much
This is my first comment so far please make advanced javascript interviews questions. You are awesome teachers so far I watched. ❤❤
so many thing learned today thanks for this amazing session.
call aur bind function kya badiya explain kiya bhaiya!aur further series continue kariye bhaiya!
Best video i have watched so far bro to get the concept of hoisting and memory and Cody thing
Thank you
Loved it. Need more like this. Piyush Bhai start a interview js series. Me and my friends will love it.
Very nice explanation sir, Thank you!
Great explanation. Really nice the way you explain all questions. 🎉🎉🎉
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'] }
This is a goldmine, keep spreading this invaluable gold
Thanks for such a wonderful video Piyush.
Thank you sir, is type ke dusre question bhi btaiye interview ke liye. Your explanation types is very good
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?
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.
Definitely i am gonna like and share this amazing vdo .
I love you bro. I am getting confidence from watching your videos. Please make a video on Design patterns with nodejs classes examples.
Bhai aap sahi ja rahe ho, kuch log difficult questions puchake demotivate kar dete hai TH-cam pe.
Excellent!
Need more interview question like this. Thank you Piyush.
Thank yo sir, it was my first video, and you killed it great !!!
Amazing video as always, please do continue the JavaScript interview questions series.
bhai aur chahiye aise videos. thanks for this one.
need a part 2 please it is very helpful so much helpful
Please provide us interview questions for HTML and CSS also. It would be very helpful if you would include MCQs also.
What a video!! Totally worth to watch
Need more stuff like this
Thank you Piyush bhaiya for this amazing series.😊
Bro your knowledge is next level🎉🎉
this video is awesome for revising javascript concept , waiting for another video with hard questions...
Thanks bhaiya learnt alot 😊
so many things to learn
Thank you @piyush
0:53 value of Age is undefined
value of Age is 20
What an explanation 👏
Thanks a lot sir..❤
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 ,u made it very easy to understand
more of this type with great explanation
the core learning for me was js execution environment...confusion clear
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.
Maja aa gaya dost...aur video banao...banao banao..
thankx piyush more videos of similar kind needed.
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 🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏
Great questions, Learned a lot
it was fruitful video!! but U can go in more deeper to make understand ...
Sir, u are a legend ❤
I have a doubt 13:21 jab myfun(second) bhi to intialize hona chahiye tha but output first kese aaya
Excellent Teaching! :)
Please sir make video on kubernetes if possible !!
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...
Nice explanation ❤❤❤
Appreciated sir please make a video on "HOW TO SECURE OUR FRONTED & BACKEND CODE IN WEB DEVELOPMENT"
Super video❤❤❤
great explanation
Excellent work, need intermediate and hard level 10 questions each please... #my_christmas_gift😂
hats off bro 😎
awesome explanation 😍😍
Good video and best explanation
Thank you it was very helpful.
sir continue this series . we need more videos like it
We want machine coding round question video also❤❤
And thank you for this🎉😊
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?
Hi Piyush
'this' in arrow function donot refers to Global/Window object, it refers to the context where it is being called.
amazing 🥰👌
Loved this💯
Thank you for your efforts!
Thank you so much sir this was so helpful ❤❤
🔥 Awesome. Thank you!
Please do for nodejs as well as backend in general
great video piyush
Awesome 👌
Nice explanation😊
Very useful thank you😊🙏
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
Nicely Explained🙌😍🚀
9th was the mind blowing.
33:34 Heisenberg
I am Getting Second*3 at 10:19
we want more🤩🤩🤩🤩🤩🤩
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.
Best! Keep posting
amazing 🔥