this keyword in JavaScript 🔥 | Ep.06 - Namaste JavaScript Season 2 🙏

preview_player
Показать описание
End this year with learning some more of JavaScript ❤️
Share this video on social media to help me reach more people! 🚀

Wanna dive deep into React JS with me?
Use coupon code : CODE72 and register now by link below. Only valid for first 500 students.
Running heavy discounts right now, register today!

🔍 Understanding "this" is crucial for every JavaScript developer, whether you're a beginner or a seasoned pro. We cover everything from its default binding in different contexts to explicit binding using functions like call(), apply(), and bind(). Plus, we dive deep into arrow functions and how they affect the behavior of "this."

🚀 Elevate your coding skills as we showcase real-world examples and scenarios where mastering "this" is a game-changer. From event handlers to object methods, we've got you covered.

👨‍💻 Join us on this journey to demystify "this" and gain a solid grasp of its functionality, helping you write more maintainable and efficient JavaScript code.

👍 Don't forget to hit that like button, share with your fellow developers, and subscribe for more insightful tutorials!

Timestamps:
0:00 - Introduction to this keyword

If this video was helpful, give it a thumbs up and subscribe to my channel for more such videos. 🔔

If you want me to cover any specific topic, then comment down below. I would be happy to help you.

Cheers,
Akshay Saini

Stay Connected:

#Javascript #JavascriptInterviewQuestions #AkshaySaini
Рекомендации по теме
Комментарии
Автор

End this year with learning some more of JavaScript ❤
Share this video on social media to help me reach more people! 🚀
And yes, did you hit that LIKE button yet??

akshaymarch
Автор

please don't make small videos for the sake of making videos, please go deep like this, this is why you are special.

lakshmangottapu
Автор

Hey,
I think you are the person from whom I have learnt so much about javascript, I think the reason behind that is the depth you take about the topics, make it easy to understand, take out some fine details which I think I miss in documents as well. It is really good to see you doing things like this. You are an awesome teacher, keep ongoing this is what makes you unique and different. I don't think you should worry about these things you mentioned at 33:00, whoever wants to learn they to have to give time and understand the topics. Thanks for everything you are doing in frontend domain, love it by heart.

AnujSingh-xryx
Автор

Deep dive videos are what set you apart. There are a million short videos about this. Your value as a teacher is in your deep understanding. Thanks!

alexmiserandino
Автор

Please keep teaching in a detailed fashion. This is the USP of this channel. You've saved folks here collectively millions of hours of work.

kicksomeup
Автор

🎯 Key Takeaways for quick navigation:

00:00 🔑 *JavaScript's "this" keyword can be confusing for many and behaves differently in various scenarios.*
00:55 🔑 *The behavior of the "this" keyword depends on the context, such as whether it's in a function, global space, or an arrow function.*
04:17 🔑 *In the global space, the value of "this" is the global object, which can vary depending on the JavaScript runtime environment (e.g., window in browsers, Global in Node.js).*
07:30 🔑 *Inside a function, the value of "this" can be undefined in strict mode or the global object in non-strict mode.*
10:06 🔑 *JavaScript uses a mechanism called "this substitution, " where "this" is replaced with the global object when it's undefined or null in non-strict mode.*
16:11 🔑 *Inside an object's method, "this" refers to the object itself where the method is called.*
21:11 🔑 *"call, " "apply, " and "bind" are important functions used to manipulate the value of "this" when calling methods and sharing them between objects.*
26:23 🔑 *It's essential to understand "call, " "apply, " and "bind" to effectively control the value of "this" in JavaScript methods.*
27:30 🔑 *In global space, the 'this' keyword refers to the global object (e.g., 'window' in the browser).*
28:08 🔑 *In strict mode, 'this' inside a function is undefined; in non-strict mode, it refers to the global object.*
35:23 🔑 *Understanding "this" substitution: When 'this' is undefined or null inside a function, it becomes the global object.*
39:59 🔑 *Inside an object's method, 'this' refers to the object itself.*
44:12 🔑 *The 'call' method can be used to invoke a function with a specific 'this' context.*
46:01 🔑 *Arrow functions do not have their own 'this' binding and take the value of the enclosing lexical context.*
48:46 🔑 *In the context of DOM elements, 'this' refers to the specific HTML element being interacted with.*

Made with HARPA AI

venkat.sairam
Автор

Everyone on youtube is teaching basics, but these deep dive videos make this channel special.
Please continue with this.

sameerkhurana
Автор

Akshay, thank you for this video. Just wanted to let you know that your thorough explanations have been incredibly helpful. Even if the video doesn't get as many views as you hope for, please know that there are viewers like me who truly value and watch it until the end. Your videos stand out because they delve into the intricate details that many others often overlook. This level of depth often satisfies my profound curiosity for how code operates at a fundamental level. Please continue with your elaborate explanations as many others and I will continue to eagerly watch and learn. Do not only start making short videos that touch on basics and skip everything else, PLEASE!! I love learning all the details. Thank you again!!

mightychondria
Автор

Watched whole Namaste JS in a week and Season 2 too
Goat in explaining js so easily

Cpt_Price
Автор

You are known for your teaching methodology...i really appreciate it..!!! And waiting for DSA courses by you... I'm you full-time subscriber❤❤❤🙏🙏🙏

nirajkumarsingh
Автор

You deep dive into the concepts that's why we watch your videos. That's what makes you unique and helps people understand the core concepts rather than just understanding the basics and memorizing the rest of different cases. Also, such depth knowledge is what gives us the confidence on topics and help us apply the same in interviews. Always keep making the in-depth content. We love it.

dhruvkhatri
Автор

I have watched the call, apply and bind methods video.
Here is my brief explaination-
All these methods are used for method/function borrowing or sharing.
- call method is used to call the function with the given this value and arguments can be passed individually.
printFullName.call(student, "Jammu", "J&K");
- apply method is similar to call, the only difference is that instead of passing the arguments indvidually we pass the arguments in a list/array.
printFullName.apply(student, ["Jammu", "J&K"]);
- bind method is also used to override the this value but unlike call and apply it does not invoke the function instantly but returns a function with attached this and arguments which can be called later.
const printStudent = printFullName.bind(student, "Udhampur", "J&K");
printStudent();

vrindamahajan
Автор

Eagerly waiting for this video, please come up with more Javascript interview-related topics and started learning and practicing react from Namaste react in-depth

vrb
Автор

Akshay sir, loved the way that you're taking feedback from the audience. If you want to start making short-form content, we would love to watch it but don't stop making these in-depth videos. The clarity that you provide in these videos, I haven't seen anyone teaching with this much clarity, especially around JavaScript.

eshaanbagga
Автор

Your videos have saved me months of research learning js. I can't express how thankful I was to find a teacher who understands how I learn. Keep em coming!

angryatheistcharles
Автор

Review: One of the best video on "this keyword" in the whole YouTube ❤
For viewers: If you don't watch this video, thinking its to long then you will regret more than anyone else in future 😉

BiswaketanChoudhury
Автор

I have never understood JavaScript this deeply anywhere else. Your mission is very inspirational for developers like us. Please keep making it. Thank you for all the knowledge, Akshay🤟.

khyatiratandhayara
Автор

I'll be honest, let us consider the 2 scenarios:

i) short videos: gives an impression of making the topic easy, and chances are more people will watch it entirely.

ii) deep dive videos: it may appear tough just by looking at the timestamp, but in reality this is a treasure, and people who genuinely care to learn will watch it start to end.

There is no doubt about every single video of yours are super interesting so even if I watch it at 2x I still can understand everything

hemantprasad
Автор

One of the best teachers on Youtube. I'm so glad I found your channel. I understand javascript better than ever. I had watched the call, apply, bind video before this topic and the explaination was amazing. Looking forward to more detailed videos on javascript. Keep up the amazing work!

ashishkalburgi
Автор

Finally, I found a one-stop solution to understand this keyword. I assure you that no one can teach this keyword better than you. I am so glad that I don't have to break my head before an interview to revise this keyword. Your effort goes beyond everything. Thank you so much. Keep teaching!

YashMehar-hffv