What is THIS in JavaScript? in 100 seconds
ΠΡΡΠ°Π²ΠΊΠ°
- ΠΠΏΡΠ±Π»ΡΠΊΠΎΠ²Π°Π½ΠΎ 15 Π²Π΅Ρ 2024
- Learn what the "this" keyword does in JavaScript in 100 seconds. And stay tuned for a few minutes of more advanced discussion after the credits.
#javascript #100SecondsOfCode
Install the quiz app π€
iOS itunes.apple.c...
Android play.google.co...
Upgrade to Fireship PRO at fireship.io/pro
Use code lORhwXd2 for 25% off your first payment.
My VS Code Theme
- Atom One Dark
- vscode-icons
- Fira Code Font
The extension to the 100 seconds is great, keep doing that.
Glad you liked it :)
isGreat(this.100seconds.extension) returns true.
@@rogadev nope, you can't have numbers as a property, a more convenient way of doing this would be isGreate(this["100seconds"].extension) ;)
@@maxencedc While fixing one bug, you created another.
Its "isGreat"
@@avinashthakur80 You're right. But it's a typo whereas his wasn't
This is by far the most succinct and clear explanation of `this` that I've seen to date. Great work as always!
Learning THIS before this videos: π°
After this video: π
Agreed
Did you even try to run that code???? IT DOESN'T WORK !!!!
*sees title*
*sees video length*
*confused screaming*
Watching more than 100 seconds is completely optional (but highly recommended).
@@Fireship nah, it's a cheap clickbait tactic.
@@danielelkins247 what ? how is this clickbait are you braindead ?
@@danielelkins247 if you don't want the knowledge then you can just go away
@@danielelkins247 do you want some attention?
Now you've done it.
Obviously this is only optional, if you don't like it, just unsubscribe. Simple.
I have lost out in interviews because, although having a conceptual understanding, I could not properly articulate all of .. uh.. this. This this video nails it, and I feel that much more confident. Best six minutes I've spent on anything ... uh.. this.. week.
π―He went over 100 seconds.. I didn't know that was allowed haha. I actually really like the 100 seconds prefaces with in depth breakdown to follow π₯
Sweet! I'm hoping throw in more extended segments in the future.
I look forwards to them man! Me and all the devs at work watch your videos religiously!
I second this, please do in depth follow ups, your videos are beyond bomb.
I'm trying to spread your videos to others, instead of corona, your channel should be pandemic.
just a paid comment I believe ????? Did you even try to run that code???? IT DOESN'T WORK !!!!
Been a Javascript developer for almost 2 years and I finally realized the difference between bind() and call(). I always thought they were exactly the same functions with the only difference being call() accepts function parameters..
Those 3 methods are hard to keep straight.
@@Fireship The ABCs of JS functions...
keep it up, I've been working with JS for 6 years now and I can tell you this... it was worth the time :)
just a paid comment I believe ????? Did you even try to run that code???? IT DOESN'T WORK !!!!
This is probably the best explanation I've seen on the 'this' keyword, .bind(), .call(), and .apply().
one of not many channels creators who I watch with normal speed and stops on some topics. Lot of content, respect
Wow thanks for including my name.
P.S :- Loving the 100 sec series. It's something I have been recommending people before and interview or when I have to give some learning reference material before the allocation of work for interns in our company
Thanks for the suggestions! Glad to hear your team is finding them useful :)
just a paid comment I believe ????? Did you even try to run that code???? IT DOESN'T WORK !!!!
i need more videos explaining things in 397 seconds lol, absolutely loved it. I am new to the front end world and this channel has helped me so much, LOVE YOU GUYS
When are you gonna make a video on Deno?
Also, that last chaining tip is a BOMB
I am, it's on my list and I've messed around with it a little bit. Not saying chaining is something you should do, just showing how it works.
@@Fireship Actually just needed some Capitals to gain some attention. Not something I do either
Glad to hear that :)
Builder pattern is the bomb
What about Deno?
The extended part after the quick introduction is amazing !!!!!!
I love 100 seconds videos but the possibility of having a deeper explanation... just amazing! Thank you!!
3:29 "In an arrow function this is based on the enclosing object's execution context"
brain.exe has stopped running
XD
i agree.
with this he meant the lexical scope, or from where the function was called, since the method was called in the global scope, its execution context was global :3
It means two level up from the current function scope
MyThinking server has gone away
I've watched the whole thing and this went way over my head
These r great but I love the longer vids where u make smth from scratch . It's great to see how stuff Is implemented and stuff and there are a lot of great tips in there
I hear you, trying to do a mix of both formats.
just a paid comment I believe ????? Did you even try to run that code???? IT DOESN'T WORK !!!!
Quality content is valued, video length doesn't matter just keep it tight and crisp as alwaysπππππΌππΌππΌ big fan, are you on Instagram as well?
Thank you! on IG as fireship_dev
just a paid comment I believe ????? Did you even try to run that code???? IT DOESN'T WORK !!!!
Sometimes 100 seconds isn't enough to give a good understanding about a subject, so with the extension part, the video got more interesting. Thanks for the video!
The last 5 seconde of the video blew my mind, great job,keep extending your 100sec series please
I love this extra segment bro
I love the extra portion. I hope youβll keep adding it when itβs pertinent. Thanks for the fabulous work!
WOW!!!! Whenever that notification pop up i received , i feel so happy , streams of knowledge. I just wanted to say thank you Jeff βΊοΈβΊοΈππ. Can you please make one video on Symbol , proxy and other meta programming things. Thanks.
Thanks for watching, those would make good advanced topics π
more like observables of knowledge ;)
Excellent explanation! I'm so happy that it went beyond 100 seconds. π₯
Seriously, nobody has counted how many times this is said in this video about this? This is inconceivable. π
the explanation of bind() context to this keyword is very usefull. I have seen many other tutorials, but they just code it and show What is the output, instead of describing the functionality.
Once again thanks π
Yesss, *this* format of the video is very nice!
Yes, I love we got the best of both worlds here, For those who need a refresher, we don't need to scrub through the video to find what we need, it's right there at the beginning, and if we need more information we can keep watching for a deeper dive without having to go find another video on the subject where the quality likely wouldn't come close to the quality of your videos. Keep making great stuff man, I love you(not weirdly, I swear) for it.
Excellent video, Jeff! I love the speed in the beginning and the slow part for people who can't understand under 100 seconds of a topic. Keep it up as always!
just a paid comment I believe ????? Did you even try to run that code???? IT DOESN'T WORK !!!!
+1 for the extension concept!
Thank you for the good work!
Hi Jeff,
I admire the way you can explain things in such an efficient, fun and pleasant way.
What is your mental model and strategy for teaching?
Have you considered making a video about it?
Thanks for all the great high quality content, and the inspiration!
Can I ever stop getting impressed of your videos?
I love the new segment keep it up :)
Really like the extension on the 100 second videos.
Great style of teaching fast general introduction to the topic then a slower paced deeper explanation
Your explanation is very good. But the background music is too loud. You should make it a bit lower. BTW, thanks for "this"
I literally clapped after watching this π video. Great work as always!
Nice, 100 seconds that take a week to unpack. Great job!
Favourite channel. Favourite teacher.
Loved this Jeff
Thank you so much for making this so early π
Liking the encore beyond 100 seconds - great visuals in every video!
Its better with this extra part, hope u would be continue with this, a bit too fast, for non english native speaker :) Great channel!
Some tips for videos:
Npm vs Yarn
CSR vs SSR
Protractor vs Selenium vs Cypress
Replace Protractor with Cypress in Angular
I like that youv'e gone beyond 100 seconds and broke this down π
what did he switch on in the editor at 4:22? it looked like it was an interactive node shell integrated into whatever editor he's using. he's so cool btw
great (397 sec) video! must-see for JS developers, clear as crystal ππ»
this (the video) is pretty usefull because it can help mid to senior developer with interviews since the execution context is a common question out there
I find `this` video great and would like to see more "100 seconds + Breakdown" type videos in the future.
Need to fix the title, in* not is.
Also you should do a video on static in Java, for a long time I didn't care about it till I was doing a project and I found that it never worked unless I used it for a variable. Now I finally understand what it's used for.
This channel is about frontend web development, and Java definitely isn't Javascript.
U have just said things that I have been learning for past 1 month in 6 min great man.. π₯
The "extra time" after 100 seconds is really helpful :D
I love the extension.
I mean I am hooked to your videos, this might be the best series I saw in a while along with money heist!
I just saw THIS popping in my notification and THIS is awesome... Now figure out which THIS is THIS
P.s.: really loved this video β€οΈ
Love it :D, keep em coming. I need more!!!!
That part about chaining π
.apply() have better performances than .call() + spread operator.
If you don't spread your arguments, better use apply.
The extension is awesome! Big like!
liked the long version, try create the extended version of the old 100 secs vids please :D
great Videos,
I hope if you can make a Video about :
how does the browser actually render a website.
I love this extended version of 100s
i like the 100 second overview first and then indepth look later.
THIS...
is an amazing video explanation!
I love your work,
could you make a video on node and express please
1:18 ah yes, C, the well-known object-oriented programming language
Create your own Framework of Javascript! And be damn sure we will support it! aka - fs.js? I love this community full of inspiration for Web Developers!
Haha, I don't think the world needs any more JavaScript frameworks.
Great content man, "This" has been a nightmare to learn and I can say I am starting to get my head around it now
Thanks for fulfilling my request π
Jeff, how do you do the fast "copy paste" to record the code, it looks like magic.
He writes the code by pasting it and deleting it chunk by chunk. Then he simply presses ctrl + z to undo it.
@@anaycoding6594 Thanks, I just tested, not necessarily "write code by pasting", write code by hand then delete and undo does the job do.
wow, i learned a lot from this
The extension was great. Especially for someone new at core concepts of js
Love this extra segment and as usual the perfect content
Keep the extensions for sure !
Please do some series on functional patterns in js.
great video, im still waiting for the video about the "class" keyword ^^
Sometimes I think I don't understand "this", but learned to get around it with binds and arrow function.
Are you planning on making a video about google cloud serverless functions with typescript?
When I was learning Vue, 'this' confused me so much when writing methods.
Understandable, that's why I mentioned the Vue docs in the extra segment.
i definetly like this extra segment!
Awesome....what vscode theme do you use?
Not only is Fireship one of the best teachers on the internet, he has the best voice at .75 playback speed! π₯π₯π₯
What is this ? Why are theese tutorials having such a high quality ? I subscribed btw :)
Thank you for your amazing and informative content.
Ah I love βthisβ beyond 100 seconds :) nice idea
Method chaining is real mindblower
Please keep doing the beyond 100 seconds it's awesome!! Also sorry about your mom :(
Thank bro this was the best and shortest explanation about this. great job.
I am just getting confused sometimes that whether you are referring to the 'this' of JavaScript or the grammar this?
Isn't 'Execution Context' synonymous with 'Scope' and 'this' is known as 'Context' which depends on the way function is invoked. Whereas 'Execution Context' is responsible for variable resolution.
hey i like this beyond 100 sec video. Keep making this and make explanations as simple as this is other videos too
Yeah I would love some more videos about "this."
I love this channel, always straight to the point πππ
we need that beyond 100 seconds section in every 100-second video
Awesome video!! It took a while for me to grasp the concept of "this", but your explanation helps a lot! π₯π₯π₯
just a paid comment I believe ????? Did you even try to run that code???? IT DOESN'T WORK !!!!
I did not understand much, but thank you for this video!
I love the content past 100 seconds
This channel is amazing.
@3:22 I thought that was my baby crying, but then I realized I don't have a baby
Typo in title. But good video! :)
I got the notification and couldn't figure out what was meant
always go beyond dude, love it
Keep the beyond 100 seconds, it helps alot. but if you are doinf the deep breakdown after the 100 seconds in an other video taht would be even greater.