Javascript Interview Questions ( 'this' Keyword ) - Output Based, Scope, Implicit Binding, etc

preview_player
Показать описание
#JavascriptInterview #Javascript #FrontendInterview

Javascript Interview Questions on 'this' Keyword ( or Implicit Binding ) will be discussed in this video including how it behaves in global context, Function, Object etc.

🟦 Follow me on Twitter and u will clear your interview 🤓 -

⭐ Support the channel and learn from me One on One -

🔗 Blog for the video -

🔗 Functions Interview Video -

🔗 Objects Interview Video -

🔗 Javascript Interview Series -

🔗 Cars24 Interview Experience -

🔗 Unacademy Interview Experience -

🔗 MERN Stack Tutorial with Redux -

🔗 React Beginner's Project Tutorials -

-------------------------------------------------------------------------

00:00 Intro
01:00 What is 'this' ?
01:53 'this' in Global Context
02:30 'this' in normal function
03:08 'this' in arrow function
03:37 'this' in function inside Object
07:33 'this' in a class
09:26 Ques 1 - Output Based Question
10:35 Ques 2 - Result of accessing ref
12:41 Ques 3 - setTimeout and 'this' keyword
14:59 Ques 4 - Output Based Question
15:44 Ques 5 - Create a Calculator
17:24 Ques 6 - Output Based Question
20:15 Ques 7 - Implement 'calc' object
22:39 Call, Bind and Apply

-------------------------------------------------------------------------

Special Thanks to our members -
Srinivas Ayyagari
Saikiran K
Рекомендации по теме
Комментарии
Автор

You are an absolute genius, i never understood this concept but your teaching is just fabulous, i hope that you launch your own udemy course in a structured way to master JS. You deserve to get paid for such content

xen
Автор

this is some excellent practice material. pls add more o/p based Qs for OOJS, Prototypes, etc.
an addition to the problem at 17:25 -
if at line 4, we use let/ const instead of var to create 'length' variable, then while executing 'callback', the (this) Window object won't have length set to 4. It could be anything, like in JSFiddle, it is set to 0. since let/ const are created in TDZ.
there can be so many more variations to this problem. i find this an incredible practice problem. many thanks!

harshdeepbilaiya
Автор

I know it is a generalization, but many Indian devs seem to have issues with following naming best practices and I can't figure out why that is...On a more serious note, great videos, well structured and researched.

ninjaplavi
Автор

Great video! Are you going to drop some videos related to OOP Concepts(constructor, class) or Prototype Inheritance?

simionandrei
Автор

this channel is highly addicted, i have seen more than 10 videos continously

purusharma
Автор

I havent seen more detailed videos on coding subjects than yours! Thank you!

ivanshoshkov
Автор

Great explanation! A more accurate answer would be :
In an arrow function "this" is a part of its closure, i.e. it is taken from the context. Where it is defined and not the object in which it is defined.
In a normal function "this" is points to the object it is a part of.

AkramDevTalks
Автор

Thanks Piyush, your roadside coding clears so many doubts related to "this" 🤟🙏🙏

sanjaytk
Автор

This is some really high quality content and all for free! Your curation of questions are impressive, really making me scratch my head. Thank you mate!

shash_
Автор

Thanks, Was waiting for this!
I was asked many questions regarding this in Cars24 interview this week 😄

MukeshKumar-btgb
Автор

I was recently asked a question on what is the difference between invoking the object directly suing the method & using call
I did not know this implicit bindings vs explicit binding
Great one kudos piyush :)

front-end-world
Автор

Extremely helpful video! Helped me to develop a more clear understanding of 'this' keyword . Please keep on making more such output based questions videos.

shrushtipolekar
Автор

Thank you Piyush, great explanations as always.

lannsterroy
Автор

Just learned so many new things from this video. The last ques is just amazing. Please make more such video of questions like the last one. Highly informative content 👌✌

anubhapant
Автор

I absolutely LOVE your videos. You are amazing at explaining everything and for the first time EVER, I finally get it! Thank you. Do you have patreon? I'd love to support you.

kalynndier
Автор

This always sounds confusing. Just the easiest way to interpret. Its always the caller function for the normal function calls and for the arrow functions it will always be 2 level deeper( kind of like parent of parent)

riturathinsharma
Автор

Hi Dear… I am really a big fan… You have such a deep knowledge of almost every technology. I have 1 request… Do you have any idea about how can we call salesforce commerce cloud API from Angular??? please reply if you know this or make a short video. Thanks

mohininarwade
Автор

Question 6 & 7 are just mind blowing.

akshayshinde
Автор

Unbelievable video! I like all your Playlist about react and javascript...
Love from indonesian 👍

vincent
Автор

thank you because of you I understand this

shubhamkakadx