No video

Javascript this keyword explained | in Gloable Scope, Object, Function, Prototype, Method, Class

  Рет қаралды 161,562

techsith

techsith

Күн бұрын

In this tutorial I show you the meaning of "this" keyword in global scope, local scope, inside a constructor, inside a class, and with Call , Apply and bind functions. I explain it with a simple example.
Please be my patreons on patreaon
* / techsith
Follow me for technology updates
* / techsith
* / techsith1
Help me translate this video.
* www.youtube.com...
Note: use translate.goog... to translate this video to your language. Let me know once you do that so i can give you credit. Thank you in advance.

Пікірлер: 375
@manukarthikkattepuraramesh2727
@manukarthikkattepuraramesh2727 6 жыл бұрын
I got a new job because of your tutorials!! Thanks a ton!
@HK-sw3vi
@HK-sw3vi 3 жыл бұрын
what happened to the old one?
@bob-ny6kn
@bob-ny6kn 3 жыл бұрын
@@HK-sw3vi Released for watching yt videos at work, is my guess.
@slunkeh
@slunkeh 5 жыл бұрын
Fantastic teacher, this is the best explanation of "this" that I have come across by far. Thank you so much!
@Techsithtube
@Techsithtube 5 жыл бұрын
Thanks for watching!
@winstonmisha
@winstonmisha 5 жыл бұрын
"Today we are going to talk about this keyword." "I'm sorry what keyword?" " "This keyword." "WHAT KEYWORD????"
@Techsithtube
@Techsithtube 5 жыл бұрын
this "this" keyword :)
@webmaster246
@webmaster246 4 жыл бұрын
var that = this;
@tommyzDad
@tommyzDad 4 жыл бұрын
"Not _What_ , _This_ ."
@Daniel_WR_Hart
@Daniel_WR_Hart 4 жыл бұрын
This reminds me of that viral article that said "buffalo buffalo buffalo buffalo buffalo buffalo buffalo" was a grammatically correct sentence
@ChrisAthanas
@ChrisAthanas 3 жыл бұрын
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
@alexbauer1193
@alexbauer1193 Жыл бұрын
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.
@_Spartan-107_
@_Spartan-107_ 2 жыл бұрын
Hey man! Thank you so much for this. I opened my KZfaq 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!
@VarshaFlimz
@VarshaFlimz 3 жыл бұрын
Everyone starting to learn JS should see this first - very neat. Thank you techsith, you're a JS Angel :)
@rich143hkanda
@rich143hkanda 4 жыл бұрын
unogona iwe mudzidzisi, you're a great teacher !
@josuearreola9998
@josuearreola9998 3 жыл бұрын
THID CHANNEL IS LIFE SAVER!
@creaky2436
@creaky2436 5 жыл бұрын
Not all hero’s wear capes. They code in js and help us out on KZfaq
@elpolodiablo5486
@elpolodiablo5486 3 жыл бұрын
Stop posting cringe man
@creaky2436
@creaky2436 3 жыл бұрын
@@elpolodiablo5486 Hey now, nobody asked for your opinion.
@elpolodiablo5486
@elpolodiablo5486 3 жыл бұрын
@@creaky2436 Neither your cringey ass comment
@creaky2436
@creaky2436 3 жыл бұрын
​@@elpolodiablo5486 You must be around 15-20 years old. Get off of youtube, fold your laundry, and do your chores or you'll lose your allowance. Go read a book and add value to your life. No man would ever comment something like this. So i will excuse you and let life itself teach you the painful lessons that lie ahead.
@elpolodiablo5486
@elpolodiablo5486 3 жыл бұрын
@@creaky2436 judging by your comment you are no more than an 8 year old kid whose job is to beg attention in KZfaq comments
@sajithjulapalli3579
@sajithjulapalli3579 3 жыл бұрын
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.
@Techsithtube
@Techsithtube 3 жыл бұрын
Sajith, great to hear! Keep on learning!
@hayleyha9433
@hayleyha9433 4 жыл бұрын
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
@Techsithtube
@Techsithtube 4 жыл бұрын
Phuong, javaScript is a maze, I learn new things in js every day. :)
@prodigalScindian
@prodigalScindian 4 жыл бұрын
this was that much beautiful that my knowledge scope global, local and inner is expanded to more than just window. Thank you
@Techsithtube
@Techsithtube 4 жыл бұрын
Vikramaditya, Thanks for watching. I am glad that you were able to grasp the concept quickly.
@TechAahar
@TechAahar 3 жыл бұрын
Thank you brother now i learn how to clean my table, awesome tutorial :)
@vegasvato55
@vegasvato55 2 жыл бұрын
BEST EXPLAINATION I HAVE EVER HEARD... VERY WELL DONE SIR...
@somehappyguy6598
@somehappyguy6598 6 жыл бұрын
😎 Thanks for sharing and helping us to understand this beautiful language.
@Techsithtube
@Techsithtube 6 жыл бұрын
Thanks for watching Fabian!
@kushalkumar4970
@kushalkumar4970 4 жыл бұрын
Slow, clear, precise, good example, no confusion. Thank you!
@pratikfulkar4335
@pratikfulkar4335 3 жыл бұрын
you are best and your Mock interview series was great
@nikolaykoychev8261
@nikolaykoychev8261 5 жыл бұрын
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 KZfaq 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.
@Techsithtube
@Techsithtube 5 жыл бұрын
Thanks for your feedback . I have recently invested in better equipments. Thanks for an awesome comment.
@dubeykivines9202
@dubeykivines9202 4 жыл бұрын
OMG, I was not aware of 'this' keyword use case. Thanks alot for improving my skill set. One of the best tutorial on KZfaq. Hats off Man.
@Techsithtube
@Techsithtube 4 жыл бұрын
Glad it was helpful!
@odorlessflavorless
@odorlessflavorless 4 жыл бұрын
"this" channel is a gold mine. As with all gold mines, took a long time to discover!
@Techsithtube
@Techsithtube 4 жыл бұрын
Ananta, Thanks for an awesome comment.
@juanmejia7096
@juanmejia7096 3 жыл бұрын
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!!!
@JJSeattle
@JJSeattle Жыл бұрын
LOL I like the interruptions of emphasis, sounds like I leveled up on a video game, "tah dah dah dah"
@nizamuddinshaikh3185
@nizamuddinshaikh3185 5 жыл бұрын
For the first time, I came to know that so much goes in for 'this'! That's wonderful. Thanks for sharing.
@journiqeducacao91
@journiqeducacao91 2 жыл бұрын
ok this is a really good channel, thank you man you are a great professor
@stevebob240
@stevebob240 3 жыл бұрын
'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.
@rohitkudalkar92
@rohitkudalkar92 2 жыл бұрын
with a number of examples, you have cleared it very nicely. thanks, love, and support.❤
@youmyname
@youmyname 2 жыл бұрын
VERY NICELY EXPLAINED TECHSMITH KEEP UP THE GOOD WORK
@luqmannbr
@luqmannbr 5 жыл бұрын
i love javascript after learning from you @techsith
@Techsithtube
@Techsithtube 5 жыл бұрын
Thanks for watching! :)
@divyaindoor7351
@divyaindoor7351 3 жыл бұрын
thank you for explaning "this" using various use cases ! now "this" is awsm !!!!
@Techsithtube
@Techsithtube 3 жыл бұрын
My pleasure 😊
@aydns7
@aydns7 6 жыл бұрын
great teacher
@Techsithtube
@Techsithtube 6 жыл бұрын
Thanks for watching!
@katdareshruti
@katdareshruti 4 жыл бұрын
'this' is indeed a great tutorial. Prevented me from watching 'that' and 'that' and 'that' other tutorial to get 'this' one concept👍👍
@Techsithtube
@Techsithtube 4 жыл бұрын
I like 'this' comment :)
@purplesomeone
@purplesomeone 4 жыл бұрын
I like your teaching style!
@alexbaklanov3685
@alexbaklanov3685 5 жыл бұрын
This house allegory is indeed brilliant!
@Techsithtube
@Techsithtube 5 жыл бұрын
lol, tables everywhere
@HukMarta
@HukMarta 6 жыл бұрын
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 ;)
@Techsithtube
@Techsithtube 6 жыл бұрын
Thank for recommending my channel to your friends :)
@ivanurbina2422
@ivanurbina2422 3 жыл бұрын
Nice.This is the best explanation I saw using the analogy object as ‘home’. Very well explained!
@sherinkonline
@sherinkonline 5 жыл бұрын
You are simply awsome, the way you represent things is easy to understand. Keep going All the best
@chingizshidenov547
@chingizshidenov547 6 жыл бұрын
The best explanation ever
@Techsithtube
@Techsithtube 6 жыл бұрын
Thanks for watching!
@jithinraj7211
@jithinraj7211 2 жыл бұрын
thank you for your neat and clean explanation
@BobbyBundlez
@BobbyBundlez 4 жыл бұрын
holy crap this was a super helpful vid. thanks man
@Techsithtube
@Techsithtube 4 жыл бұрын
Glad it helped!
@metascopeinitiatives2550
@metascopeinitiatives2550 Жыл бұрын
Thank you Techsith. I have subbed. I am grateful.
@christophm.
@christophm. 5 жыл бұрын
Very nice and approachable explanation!
@salamina_
@salamina_ 3 жыл бұрын
very clear explanation using simple scenarios. thanks!
@Techsithtube
@Techsithtube 3 жыл бұрын
Glad it was helpful!
@adamcrap
@adamcrap 6 жыл бұрын
Great analogy between the this keyword and a house!!
@Techsithtube
@Techsithtube 6 жыл бұрын
Adam, I believe that analogy that involves real life scenarios somehow helps us understand concepts. Thanks for watching!
@amundsenq1835
@amundsenq1835 6 жыл бұрын
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.
@leonardvanduuren8708
@leonardvanduuren8708 2 жыл бұрын
Thank you. The best explanation out there.
@limitless9483
@limitless9483 5 жыл бұрын
very good teacher thanks( subbed &liked )
@VinothKumar5403
@VinothKumar5403 6 жыл бұрын
Liked before watching..
@Techsithtube
@Techsithtube 6 жыл бұрын
Thanks for the premature like !
@Alex-zp6oi
@Alex-zp6oi 3 жыл бұрын
You are just awesome. khub saras explain karyu tame.
@Techsithtube
@Techsithtube 3 жыл бұрын
Khub khub aabhar,
@itzelenciso7958
@itzelenciso7958 4 жыл бұрын
Excellent! thanks for all the help!
@Techsithtube
@Techsithtube 4 жыл бұрын
Itzel, Thanks for watching. :)
@bindumanjunath6609
@bindumanjunath6609 2 жыл бұрын
Great explanation with real world example. Thank you!
@manibuilders
@manibuilders 5 жыл бұрын
superb video. It cleared all my doubts on 'this' keyword
@Techsithtube
@Techsithtube 5 жыл бұрын
Great! thanks for watching!
@ultieliot7450
@ultieliot7450 3 жыл бұрын
First time I see your vids, dropped a like 6 seconds in, tried to relike it 1 minute in... Your explanation is phenomenal
@Techsithtube
@Techsithtube 3 жыл бұрын
Glad you liked it! :)
@j.almadhaji
@j.almadhaji 5 жыл бұрын
the best video from the best teacher..God bless you
@Techsithtube
@Techsithtube 5 жыл бұрын
Thanks for watching Jalal.
@alex-dk2rj
@alex-dk2rj 6 жыл бұрын
Yo you just saved me after hours of struggling with this! Great teaching.
@mela7611
@mela7611 4 жыл бұрын
i love the harry potter type music in between the topics
@adnantariq3346
@adnantariq3346 5 жыл бұрын
which this is a good example of the "this" keyword, I think it's a better sample of the .call and it's abilities.
@topazmuigai965
@topazmuigai965 4 жыл бұрын
I'm learning quite a lot, thanks!
@kaiparado
@kaiparado 4 жыл бұрын
Great lessons, crystal clear explanation. thank you
@mikerodrigues3530
@mikerodrigues3530 5 жыл бұрын
Its explained in such a easy manner ... thanks
@bilgeturkkan6095
@bilgeturkkan6095 5 жыл бұрын
You are amazing, greeting from Turkey!
@niranjanpoddar3203
@niranjanpoddar3203 6 жыл бұрын
Thanks for responding on my mail. Your tutorial is really helping me for understanding the concepts.
@kanugantikarthikredd
@kanugantikarthikredd 4 жыл бұрын
Thank you techsith. You just earned my patronage! Keep it up brother
@Techsithtube
@Techsithtube 4 жыл бұрын
Thanks Karthik . Keep on learning brother!
@rittickdatta1209
@rittickdatta1209 4 жыл бұрын
Awesome clarity in your videos man, great stuff!
@kartikisahu4938
@kartikisahu4938 5 жыл бұрын
Thanks, Techsith for "this" tutorial :)
@VarunJain15
@VarunJain15 3 жыл бұрын
Hi Kartiki
@spirlo
@spirlo Жыл бұрын
This helps me a lot Thanks!
@anilpatel08
@anilpatel08 6 жыл бұрын
Awesome Tutorial (Your Examples Gives Clear Interpretation of Understanding Concept) Thanks for making this video...😊
@alex-front-end
@alex-front-end 6 жыл бұрын
Awesome manner of explanation! Cool channel. Don't stop, thank you!
@johnywalkie
@johnywalkie 6 жыл бұрын
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! :)
@vaclavvlcek4527
@vaclavvlcek4527 3 жыл бұрын
Man, this is really good video, it cleared so many things for me! Thank you for that!
@motorings735
@motorings735 5 жыл бұрын
This was incredibly helpful! Thank you.
@ToddsDiscGolf
@ToddsDiscGolf 2 жыл бұрын
Your videos are amazing 👌
@maggychoi5384
@maggychoi5384 4 жыл бұрын
your lecture helps me a lot to figure out :D thanks so muchchchhc :D
@Techsithtube
@Techsithtube 4 жыл бұрын
Happy to hear that!
@carlosnoelsotocalderon3375
@carlosnoelsotocalderon3375 4 жыл бұрын
Hi, your video really help me, great explanation. I translated this video to latin spanish, hope it help others. Thanks.
@adistef
@adistef 6 жыл бұрын
In JavaScript, functions are first-class objects, because they can have properties and methods just like any other object.
@Techsithtube
@Techsithtube 6 жыл бұрын
yes but it doesnt have this . unless your function is used with 'new' keyword.
@tolstoy_was_right
@tolstoy_was_right 3 жыл бұрын
you are a " GOD of 'this' " 🔥🔥🔥
@triumphmantra968
@triumphmantra968 5 жыл бұрын
you saved my day bro...
@Techsithtube
@Techsithtube 5 жыл бұрын
I am glad that you got it Rohit. Keep on learning!
@srinumajji501
@srinumajji501 6 жыл бұрын
nice tutorial, Every thing is cleared with 'this' thanks Sir
@majia
@majia 6 жыл бұрын
Best explanation ever for this. Thank you so much!
@qianbang_
@qianbang_ 6 жыл бұрын
Liked after the analogy with the house
@ktran031
@ktran031 6 жыл бұрын
Oh the great techsith has made another amazing video!
@spacewad8745
@spacewad8745 6 жыл бұрын
I am in love with javascript.
@Colstonewall
@Colstonewall 6 жыл бұрын
I'm not. Try Python, then come back and tell me that, lol.
@MrC0MPUT3R
@MrC0MPUT3R 5 жыл бұрын
Try TypeScript
@iaml2909
@iaml2909 4 жыл бұрын
@@Colstonewall nahh C is much much bettler.
@DiogoSantos-ln1nz
@DiogoSantos-ln1nz 4 жыл бұрын
@@Colstonewall Any particular reason why you're learning both? Like Front End and Back End?
@Colstonewall
@Colstonewall 4 жыл бұрын
@@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.
@htiwarih
@htiwarih 5 жыл бұрын
Thank you so much for 'this'. 'this' helps a lot :)
@gabe1006
@gabe1006 3 жыл бұрын
Great explanation!
@Roger-ub3wp
@Roger-ub3wp 6 жыл бұрын
Thanks a lot, a very clear illustration of this concept.
@RajeshSahani
@RajeshSahani 5 жыл бұрын
Awesome explanation with different situations
@geofryjoanjimeneztorres6224
@geofryjoanjimeneztorres6224 2 жыл бұрын
Thanks my friend! Awesome!!!
@spencerknight1730
@spencerknight1730 3 жыл бұрын
this cleared up so much for me. thanks!
@arunkaiser
@arunkaiser 4 жыл бұрын
Fantastic no words dude
@sweat_gamer5540
@sweat_gamer5540 6 жыл бұрын
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.
@Techsithtube
@Techsithtube 6 жыл бұрын
GOod point. I will consider correcting it for the next video.
@prakharmittal6295
@prakharmittal6295 6 жыл бұрын
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.
@kubataiupov1245
@kubataiupov1245 3 ай бұрын
Nice tutorial!!!!
@saikiranrudra1283
@saikiranrudra1283 6 жыл бұрын
you explain concepts really well
@budheshwartiwari599
@budheshwartiwari599 5 жыл бұрын
Thanks you so much techsit tutorial
@mocococo2877
@mocococo2877 4 жыл бұрын
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.
@timp2315
@timp2315 6 жыл бұрын
Great job!! Love your visual explanation!! More of that stuff! Keep it up! Thanks :)
@tejeswarsahu2498
@tejeswarsahu2498 6 жыл бұрын
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.
@Techsithtube
@Techsithtube 6 жыл бұрын
Hi Tejeswar, I have created a playlist of js fundamentals from beginning. kzfaq.info/sun/PL7pEw9n3GkoVYU-ZKBrDnxIiiUn0YP-uO
@tejeswarsahu2498
@tejeswarsahu2498 6 жыл бұрын
Thank you very much...
@namangarg3933
@namangarg3933 4 жыл бұрын
Amazing approach and fantastic explanation !!
@Techsithtube
@Techsithtube 4 жыл бұрын
Thanks for watching Naman.
@buttslaya
@buttslaya 4 жыл бұрын
Thanks this was great.
@Harshavardhan-gd4eu
@Harshavardhan-gd4eu 6 жыл бұрын
Amazing teaching :) Love the way you explain things .
@Techsithtube
@Techsithtube 6 жыл бұрын
Thanks for watching Harsh!
@aaronaaronaaron5922
@aaronaaronaaron5922 6 жыл бұрын
this video was really nedeed!!! Thanks
Async Await JavaScript ES7
26:39
techsith
Рет қаралды 120 М.
What is THIS keyword in JavaScript? - Tutorial for beginners
26:40
Кадр сыртындағы қызықтар | Келінжан
00:16
Kind Waiter's Gesture to Homeless Boy #shorts
00:32
I migliori trucchetti di Fabiosa
Рет қаралды 15 МЛН
Object-Oriented Programming is Embarrassing: 4 Short Examples
28:03
Top Tricky JavaScript Interview Questions and Answers
15:42
techsith
Рет қаралды 82 М.
JS "this" and Function References - What is it all about?
20:20
5 Tips For Object-Oriented Programming Done Well - In Python
16:08
What's the difference between functions and methods in JavaScript?
17:08
JavaScript with Marek
Рет қаралды 12 М.
Tricky JavaScript interview questions and answers
21:01
techsith
Рет қаралды 132 М.
Arrow Functions JavaScript Tutorial - What NOT to do!!!
31:48
ColorCode
Рет қаралды 55 М.
JavaScript Pro Tips - Code This, NOT That
12:37
Fireship
Рет қаралды 2,5 МЛН
The "this" Keyword - Javascript In Depth
1:04:30
Tech with Nader
Рет қаралды 3 М.