I wish he would say “keyword this” and not just “this” when referring to the keyword, and “here” to speak of some thing instead of using “this” everywhere
Extraordinary tutorial. Sets itself apart by covering all use cases of the 'this' keyword. My only humble suggestion, is that instead of overwriting on previous example, you could comment out and write the next example underneath. BIG THANKS!!!
Invest in video production meaning changing the quality of your cam(s), the post-production quality as well (meaning video edit) and you'll become a UA-cam content creator/programming guru/teacher that is to be admired. Keep doing what you do and one day you'll be one of the top teachers on 'this' platform. You sir, are amazing.
Hey man! Thank you so much for this. I opened my UA-cam and went to my "computer programming" page of suggestions. Didn't really know what I was getting into but this was great. You do a very good job of breaking things down in a way that others do not and make things understandable for the lay person!
Constructive comment: I agree with @adi stef that functions are actually objects. That's why statement at @7:36 is not correct. As a result THIS inside function refers to itself. Anyways, I like your work and i've learned a lot from you so thanks and keep the good work! :)
So glad that I have found your lectures. I had aversion for Javascript, but after started following your tutorials, I really enjoy learning different concepts. Kudos for all the support you are providing.
Thank you for your nice explanation on "this" keyword.The beauty of this video is you demonstrated the effect of 'this' in all possible different places at one place.Could you please point me to the starting js video(video 1,video 2,video 3....) so that I can watch one after other serially.Because If I am seeing your videos from here and there, there are something in each video which I do not understand.For example when I was watching this video,I was not clear about let,const.I hope you got me.
My question is on the code used around 12:10, this, inside the inner function will give error in strict mode, I think it will point to window if non strict. So why it will point to window. Please tell me
Nice clip. May I suggest a few topics I'd like to learn from you? 1. How do I know manipulating dom via javaScript is expensive? Any statistics in dev tools we can find? 2. Manipulating window's location api to change url and dom elements without refreshing browser. Like react router can do. 3. Can you explain how to avoid memory leak in browser? Like duplicating global event listener . 4. What's lifecycle flow in pure javaScript or browser render flow? Thanks.
Sir , At 17:46 , you mentioned every object that cleanRoom creates, you'll have that method automatically available to it.' Please explain this part. It is cleanTable or createRoom. Where this method gets added??
Shaurya, first of all you have to have a constructor function . which has ability to create objects. more like a class. Now instead of adding method directly to it . you can a method to its prototype. so when you create object from this constructor function all the object will have a access to these methods via some reference. Here is a playlist that will help you explain all of these. ua-cam.com/play/PL7pEw9n3GkoW0ceMeoycg9D00YjPAbtvt.html
The explanation is super and make the concept very clear. Just one issue with the music with header which comes before each scenario. It breaks the understanding flow and connectivity.
Sir your explanation was good but I felt that you carry forward everything very fast. By this, I meant that like after applying a technique, discuss it again for a better explanation. I know some people will say that pause the video or watch it again but I think it would be more clear if you discuss it again or go through the last used technique again.
Nice explanation. I just have one doubt here. At 7:36 at this point of time, You said 'function is not an object' but everywhere I have read in javascript, everything is object and indeed function is also an object in JavaScript. So can anyone here clarify my doubt regarding this point ? Thank you!!
Thanks so mush for such a comprehensive explanation!) Must say your work is really significant. I've been watching your channel for a couple of months and I've already learned a lot. Also, your tutorials are very helpful for preparing for interviews!) I've already recommended 'Techsith' to all my developer friends)) Great job, keep going ;)
@@DiogoSantos-ln1nz Well, they go together. It's kind of hard to make a REST API if you don't make a back end too. The backend stuff isn't very hard. At least in my experience, using Express is very simple and can be learned quickly. Plus, most of the people I learned from, would make a backend in their tutorials along with the frontend. Those like Brad Traversy, CodingTheSmartWay, Academind etc, all made the backend when teaching. You kind of had to at that point in time. There weren't these REST API's that are all ready to go services like they have now. Hopefully I explained this well, but if you don't understand my ramblings, let me know and I'll try to answer better. And, if you need ANY, any help with anything, let me know and I'll help you if I can. If you want my email address, let me know.
Good explanation about 'this' , giving a example really help us to understand and use in real world scenario, could you please give some real world example like how to use in app like banking, or hotel booking etc.. so that it will be more useful. Same examples for complicated topics like promises and closures. Thanks Sir for sharing knowledge with us :)
i have a question. in video from 7.17 min .. you refered that we cannot use this inside the function as it is not a method. but when i change the type from const to var..i can use {this} inside that function. Is it because since the type is changed to var the funvtion gets attached as a method to window object and acts like a method of any other object? declaring it const it becomes private and has to object which is the reason why we cant use {this} inside the function. Please correct mu understanding.. Thanks in advance.
It has nothing to do with const or var. It used to give error in strict mode but now it doesn't in recent browser. Also you can see it doesn't make sense to use 'this' in this case because its giving you 'this' of outer scope which is windows. Declaring it as const doesnt mean private. it means you cant reassign value to it using '='.
@@Techsithtube so as mentioned in video, is it correct that declaring a variable with let keyword make it private? Or that Variable also gets added as a property to the window object?
I got a new job because of your tutorials!! Thanks a ton!
what happened to the old one?
@@HK-sw3vi Released for watching yt videos at work, is my guess.
Fantastic teacher, this is the best explanation of "this" that I have come across by far. Thank you so much!
Thanks for watching!
You are the best teacher I have found anywhere on the Internet to explain complicated JS topics. Thank you for your videos and clear explanations.
"Today we are going to talk about this keyword."
"I'm sorry what keyword?" "
"This keyword."
"WHAT KEYWORD????"
this "this" keyword :)
var that = this;
"Not _What_ , _This_ ."
This reminds me of that viral article that said "buffalo buffalo buffalo buffalo buffalo buffalo buffalo" was a grammatically correct sentence
I wish he would say “keyword this” and not just “this” when referring to the keyword, and “here” to speak of some thing instead of using “this” everywhere
unogona iwe mudzidzisi, you're a great teacher !
this was that much beautiful that my knowledge scope global, local and inner is expanded to more than just window. Thank you
Vikramaditya, Thanks for watching. I am glad that you were able to grasp the concept quickly.
Extraordinary tutorial. Sets itself apart by covering all use cases of the 'this' keyword.
My only humble suggestion, is that instead of overwriting on previous example, you could comment out and write the next example underneath. BIG THANKS!!!
BEST EXPLAINATION I HAVE EVER HEARD... VERY WELL DONE SIR...
OMG, I was not aware of 'this' keyword use case. Thanks alot for improving my skill set. One of the best tutorial on UA-cam. Hats off Man.
Glad it was helpful!
'this' is very helpful, I know I'll get tripped up by it again in the future, but I'm feeling more comfortable with it.
Invest in video production meaning changing the quality of your cam(s), the post-production quality as well (meaning video edit) and you'll become a UA-cam content creator/programming guru/teacher that is to be admired. Keep doing what you do and one day you'll be one of the top teachers on 'this' platform. You sir, are amazing.
Thanks for your feedback . I have recently invested in better equipments. Thanks for an awesome comment.
"this" channel is a gold mine. As with all gold mines, took a long time to discover!
Ananta, Thanks for an awesome comment.
Hey man! Thank you so much for this. I opened my UA-cam and went to my "computer programming" page of suggestions. Didn't really know what I was getting into but this was great. You do a very good job of breaking things down in a way that others do not and make things understandable for the lay person!
great tutorial series. Thank you so much!! I has been learning programming for more than 1 year, I thought I knew Javascript but now I know I don't
Phuong, javaScript is a maze, I learn new things in js every day. :)
First time I see your vids, dropped a like 6 seconds in, tried to relike it 1 minute in... Your explanation is phenomenal
Glad you liked it! :)
you are best
and your Mock interview series was great
'this' is indeed a great tutorial. Prevented me from watching 'that' and 'that' and 'that' other tutorial to get 'this' one concept👍👍
I like 'this' comment :)
For the first time, I came to know that so much goes in for 'this'! That's wonderful. Thanks for sharing.
thank you for explaning "this" using various use cases ! now "this" is awsm !!!!
My pleasure 😊
You are just awesome. khub saras explain karyu tame.
Khub khub aabhar,
Constructive comment: I agree with @adi stef that functions are actually objects. That's why statement at @7:36 is not correct. As a result THIS inside function refers to itself. Anyways, I like your work and i've learned a lot from you so thanks and keep the good work! :)
Everyone starting to learn JS should see this first - very neat. Thank you techsith, you're a JS Angel :)
Thank you brother now i learn how to clean my table, awesome tutorial :)
with a number of examples, you have cleared it very nicely. thanks, love, and support.❤
LOL I like the interruptions of emphasis, sounds like I leveled up on a video game, "tah dah dah dah"
THID CHANNEL IS LIFE SAVER!
😎 Thanks for sharing and helping us to understand this beautiful language.
Thanks for watching Fabian!
Slow, clear, precise, good example, no confusion. Thank you!
great teacher
Thanks for watching!
i love javascript after learning from you @techsith
Thanks for watching! :)
This house allegory is indeed brilliant!
lol, tables everywhere
VERY NICELY EXPLAINED TECHSMITH KEEP UP THE GOOD WORK
So glad that I have found your lectures. I had aversion for Javascript, but after started following your tutorials, I really enjoy learning different concepts. Kudos for all the support you are providing.
Sajith, great to hear! Keep on learning!
ok this is a really good channel, thank you man you are a great professor
superb video. It cleared all my doubts on 'this' keyword
Great! thanks for watching!
the best video from the best teacher..God bless you
Thanks for watching Jalal.
The best explanation ever
Thanks for watching!
Very nice and approachable explanation!
Thank you for your nice explanation on "this" keyword.The beauty of this video is you demonstrated the effect of 'this' in all possible different places at one place.Could you please point me to the starting js video(video 1,video 2,video 3....) so that I can watch one after other serially.Because If I am seeing your videos from here and there, there are something in each video which I do not understand.For example when I was watching this video,I was not clear about let,const.I hope you got me.
Hi Tejeswar, I have created a playlist of js fundamentals from beginning. ua-cam.com/play/PL7pEw9n3GkoVYU-ZKBrDnxIiiUn0YP-uO.html
Thank you very much...
My question is on the code used around 12:10, this, inside the inner function will give error in strict mode, I think it will point to window if non strict. So why it will point to window. Please tell me
Animesh, it points to global object because the way javascript was designed in early days it's not always intuitive.
@@Techsithtube thanks
Nice clip. May I suggest a few topics I'd like to learn from you?
1. How do I know manipulating dom via javaScript is expensive? Any statistics in dev tools we can find?
2. Manipulating window's location api to change url and dom elements without refreshing browser. Like react router can do.
3. Can you explain how to avoid memory leak in browser? Like duplicating global event listener .
4. What's lifecycle flow in pure javaScript or browser render flow?
Thanks.
which this is a good example of the "this" keyword, I think it's a better sample of the .call and it's abilities.
Great analogy between the this keyword and a house!!
Adam, I believe that analogy that involves real life scenarios somehow helps us understand concepts. Thanks for watching!
Sir ,
At 17:46 , you mentioned every object that cleanRoom creates, you'll have that method automatically available to it.' Please explain this part. It is cleanTable or createRoom. Where this method gets added??
Shaurya, first of all you have to have a constructor function . which has ability to create objects. more like a class. Now instead of adding method directly to it . you can a method to its prototype. so when you create object from this constructor function all the object will have a access to these methods via some reference. Here is a playlist that will help you explain all of these. ua-cam.com/play/PL7pEw9n3GkoW0ceMeoycg9D00YjPAbtvt.html
Thank you sir.
I like your teaching style!
In JavaScript, functions are first-class objects, because they can have properties and methods just like any other object.
yes but it doesnt have this . unless your function is used with 'new' keyword.
very clear explanation using simple scenarios. thanks!
Glad it was helpful!
thank you for your neat and clean explanation
You are simply awsome, the way you represent things is easy to understand.
Keep going
All the best
The explanation is super and make the concept very clear. Just one issue with the music with header which comes before each scenario. It breaks the understanding flow and connectivity.
GOod point. I will consider correcting it for the next video.
Hi, your video really help me, great explanation. I translated this video to latin spanish, hope it help others. Thanks.
Sir your explanation was good but I felt that you carry forward everything very fast. By this, I meant that like after applying a technique, discuss it again for a better explanation. I know some people will say that pause the video or watch it again but I think it would be more clear if you discuss it again or go through the last used technique again.
holy crap this was a super helpful vid. thanks man
Glad it helped!
Nice.This is the best explanation I saw using the analogy object as ‘home’. Very well explained!
Nice explanation. I just have one doubt here. At 7:36 at this point of time, You said 'function is not an object' but everywhere I have read in javascript, everything is object and indeed function is also an object in JavaScript. So can anyone here clarify my doubt regarding this point ? Thank you!!
You are amazing, greeting from Turkey!
Excellent! thanks for all the help!
Itzel, Thanks for watching. :)
Great explanation with real world example. Thank you!
Thank you Techsith. I have subbed. I am grateful.
you are a " GOD of 'this' " 🔥🔥🔥
Its explained in such a easy manner ... thanks
Thank you for putting time and efforts to make this video. God bless you for that.
Those sound brakes though I find them distracting and annoying.
Amazing approach and fantastic explanation !!
Thanks for watching Naman.
Great lessons, crystal clear explanation. thank you
Thank you. The best explanation out there.
Thank you techsith. You just earned my patronage! Keep it up brother
Thanks Karthik . Keep on learning brother!
Thanks so mush for such a comprehensive explanation!)
Must say your work is really significant. I've been watching your channel for a couple of months and I've already learned a lot.
Also, your tutorials are very helpful for preparing for interviews!) I've already recommended 'Techsith' to all my developer friends))
Great job, keep going ;)
Thank for recommending my channel to your friends :)
very good teacher thanks( subbed &liked )
I'm learning quite a lot, thanks!
Just to correct you "function is also an object in JavaScript." At 7:38 told function is not an object. Though it is, like other nonprimitive types
your lecture helps me a lot to figure out :D thanks so muchchchhc :D
Happy to hear that!
I am in love with javascript.
I'm not. Try Python, then come back and tell me that, lol.
Try TypeScript
@@Colstonewall nahh
C is much much bettler.
@@Colstonewall Any particular reason why you're learning both? Like Front End and Back End?
@@DiogoSantos-ln1nz Well, they go together. It's kind of hard to make a REST API if you don't make a back end too.
The backend stuff isn't very hard. At least in my experience, using Express is very simple and can be learned quickly.
Plus, most of the people I learned from, would make a backend in their tutorials along with the frontend.
Those like Brad Traversy, CodingTheSmartWay, Academind etc, all made the backend when teaching.
You kind of had to at that point in time. There weren't these REST API's that are all ready to go services like they have now.
Hopefully I explained this well, but if you don't understand my ramblings, let me know and I'll try to answer better.
And, if you need ANY, any help with anything, let me know and I'll help you if I can. If you want my email address, let me know.
nice tutorial, Every thing is cleared with 'this'
thanks Sir
i love the harry potter type music in between the topics
Yo you just saved me after hours of struggling with this! Great teaching.
Thanks, Techsith for "this" tutorial :)
Hi Kartiki
you saved my day bro...
I am glad that you got it Rohit. Keep on learning!
you explain concepts really well
Liked after the analogy with the house
Awesome clarity in your videos man, great stuff!
when we declare variable using let in console then why it does become part of window? however var variable becomes part of window object.?
Console runs at global level that is why . var is weird i would not use it. Some things JavaScript does , only JavaScript knows. :)
Liked before watching..
Thanks for the premature like !
Thanks for responding on my mail.
Your tutorial is really helping me for understanding the concepts.
Your videos are amazing 👌
This was incredibly helpful! Thank you.
Man, this is really good video, it cleared so many things for me! Thank you for that!
Awesome manner of explanation! Cool channel. Don't stop, thank you!
Thanks a lot, a very clear illustration of this concept.
this cleared up so much for me. thanks!
Awesome Tutorial (Your Examples Gives Clear Interpretation of Understanding Concept)
Thanks for making this video...😊
Amazing teaching :) Love the way you explain things .
Thanks for watching Harsh!
Best explanation ever for this. Thank you so much!
Oh the great techsith has made another amazing video!
Good explanation about 'this' , giving a example really help us to understand and use in real world scenario, could you please give some real world example like how to use in app like banking, or hotel booking etc.. so that it will be more useful. Same examples for complicated topics like promises and closures. Thanks Sir for sharing knowledge with us :)
Thank you so much for 'this'.
'this' helps a lot :)
This helps me a lot Thanks!
i have a question. in video from 7.17 min .. you refered that we cannot use this inside the function as it is not a method. but when i change the type from const to var..i can use {this} inside that function. Is it because since the type is changed to var the funvtion gets attached as a method to window object and acts like a method of any other object? declaring it const it becomes private and has to object which is the reason why we cant use {this} inside the function. Please correct mu understanding.. Thanks in advance.
can you send me the code in the fiddle so i can try it out.
i have a jsbin link : jsbin.com/niriseq
gist.github.com/prabhakarmatkar/5c4c9cc6efc56e49eb6efb1ce55eb745
It has nothing to do with const or var. It used to give error in strict mode but now it doesn't in recent browser. Also you can see it doesn't make sense to use 'this' in this case because its giving you 'this' of outer scope which is windows. Declaring it as const doesnt mean private. it means you cant reassign value to it using '='.
@@Techsithtube so as mentioned in video, is it correct that declaring a variable with let keyword make it private? Or that Variable also gets added as a property to the window object?
Thank you it`s good for understanding tutorial
Thanks for sharing.it helps me a lot to understand basics of this.actually i was hoping you for apply also but that's okay.
It helped me a lot sir thanks 😊