JavaScript this Keyword Explained Simply

  Рет қаралды 15,837

DevSage

DevSage

Күн бұрын

Пікірлер: 48
@DevSage
@DevSage 2 жыл бұрын
💙 Twitter: twitter.com/realDevSage 📙 Ebooks: payhip.com/devsage 💥 Discord: discord.gg/BP8wPv6raA 👕 Merch: cottonbureau.com/people/devsage
@andyryan2945
@andyryan2945 Жыл бұрын
Seriously great explanation! Came here for more clarification on it after The Odin Project lesson Objects and Object Constructors
@alexferreira1534
@alexferreira1534 7 ай бұрын
Same haha
@gameXIII
@gameXIII 7 ай бұрын
'This' references to the object that calling the function. This simple sentence cleared my mind after reading a lot of stuff about 'this'. Your explanation is amazing!!
@michi19935
@michi19935 Жыл бұрын
Finally someone that doesn't speak overly fast
@JohnBogart-o9l
@JohnBogart-o9l 6 ай бұрын
Amazing explanation, much more concise than articles I've read.
@DevSage
@DevSage 5 ай бұрын
Glad it helped!
@soIatido
@soIatido 10 ай бұрын
Bro, that arrow function confused me while reading an article T - T. Thanks man!
@DevSage
@DevSage 5 ай бұрын
Happy to help!
@ArunaTebel
@ArunaTebel 2 жыл бұрын
Thanks a lot. One of the clearest explanations of `this`. 🔥
@DevSage
@DevSage 2 жыл бұрын
No problem, Aruna!
@FawnWiegand
@FawnWiegand Жыл бұрын
I've been struggling to fully comprehend this; your video really helped me out. Looking forward to checking out more of your vids ;)
@kobudnik
@kobudnik 2 жыл бұрын
Appreciate all your useful vids. They've substantially benefited me in the first couple months I started out.
@flibben
@flibben 2 жыл бұрын
Very clean explanation, thanks for that!
@DevSage
@DevSage 2 жыл бұрын
No problem!
@shivamthemas
@shivamthemas 10 ай бұрын
best tutorial on "this" subject
@DevSage
@DevSage 5 ай бұрын
Thanks!
@onagichitchat
@onagichitchat Жыл бұрын
i really want to say thank you because your simple explanation made me get it finally
@AYUSHSHARMAblogs
@AYUSHSHARMAblogs 2 жыл бұрын
Very nicely explained. Thanks
@DevSage
@DevSage 2 жыл бұрын
No problem!
@riteshmehta2292
@riteshmehta2292 Жыл бұрын
Very clear explanation ..
@newredroses
@newredroses Жыл бұрын
So, could we say that using inline functions with the `this` keyword is discouraged (bad practice) since it would require it being nested within a normal function? Meaning that instead of using an inline and nesting it, It's better to simply just use a normal function? Please correct me if I am mistaken! :)
@DevSage
@DevSage Жыл бұрын
Correct.
@chetanbawankule-w3h
@chetanbawankule-w3h 2 ай бұрын
Brilliant explaination.
@KennehGebra-cf9ds
@KennehGebra-cf9ds 9 ай бұрын
I subscribed because i was able to understand "this"
@DevSage
@DevSage 5 ай бұрын
Thanks!
@Vamsikrishna-mf6ye
@Vamsikrishna-mf6ye Жыл бұрын
@GrantH2606
@GrantH2606 8 ай бұрын
9:53 Could you just use an arrow function with the forEach method/function to solve the "this" problem?
@DevSage
@DevSage 5 ай бұрын
Yes!
@taheraalam5156
@taheraalam5156 10 ай бұрын
best video on this topic! ty.
@DevSage
@DevSage 5 ай бұрын
No problem!
@Affliction604
@Affliction604 2 жыл бұрын
Very good and instructive explanation
@FurkanKARADENIZ-tt8zf
@FurkanKARADENIZ-tt8zf 4 ай бұрын
I am okey with this topic but, i have a question. When i use this keyword on a object literal like 'fullName : this' it says it is a global object and this kind of little things confuses me. Thank you.
@charlesE89
@charlesE89 Жыл бұрын
Great explanation, thank you!
@a-mok-youb
@a-mok-youb Жыл бұрын
Is it possible to import any module without writing the module type and export it
@kristhellalvarez1306
@kristhellalvarez1306 Жыл бұрын
a big thumb up for you, thank you!
@d0tjs
@d0tjs 11 ай бұрын
was very helpful, thanks ..
@DevSage
@DevSage 5 ай бұрын
You're welcome!
@codify2450
@codify2450 2 жыл бұрын
you are a legend
@Kotovar
@Kotovar Жыл бұрын
Thanks!
@spageen
@spageen 11 ай бұрын
this is awesome
@DevSage
@DevSage 5 ай бұрын
Thank you
@aloktomar8566
@aloktomar8566 2 жыл бұрын
on forEach (8:02) when this refers to window object why dont we use arrow function for ex: this.hobbies.forEach((hobby)=>{ ( console.log( this.firstName )} ));
@abhishekpratap05
@abhishekpratap05 2 жыл бұрын
You can, i guess he just wanted us to learn how to fix it without changing the callback function type.
@hazfrd
@hazfrd 2 жыл бұрын
Right , but its more interesting to do that way for the sake of concept and learning isnt ?
@mrjeevy7720
@mrjeevy7720 Жыл бұрын
Great explanation, thanks!
JavaScript Closures Explained Simply
8:43
DevSage
Рет қаралды 6 М.
JavaScript Web Workers Explained
12:52
DevSage
Рет қаралды 100 М.
Why no RONALDO?! 🤔⚽️
00:28
Celine Dept
Рет қаралды 91 МЛН
What is THIS keyword in JavaScript? - Tutorial for beginners
26:40
Understanding the Keyword THIS in JavaScript
13:59
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 9 М.
Best Javascript Recursion Explanation on YouTube
10:38
DevSage
Рет қаралды 148 М.
JavaScript Debouncing Explained Simply
16:04
DevSage
Рет қаралды 9 М.
The JavaScript SUPER keyword is super! 🦸‍♂️
9:22
Bro Code
Рет қаралды 19 М.
The this Keyword
19:44
procademy
Рет қаралды 2,3 М.
Visually Understanding JavaScript Prototypes
14:58
Steve Griffith - Prof3ssorSt3v3
Рет қаралды 55 М.
Learn Javascript Function This | This JS
9:26
Monsterlessons Academy
Рет қаралды 3,2 М.