Mastering JavaScript's this Keyword

🚀 Day 17 of My JavaScript Learning Journey Today I explored one of the most confusing yet powerful concepts in JavaScript: 👉 The this keyword. At first, it felt tricky because the value of this changes depending on how a function is called. But once I understood the logic behind it, everything started making sense. Here’s what I learned: 🔹 In object methods, this refers to the object calling the method. 🔹 In regular functions, this behaves differently depending on strict mode. 🔹 Arrow functions do not have their own this — they inherit it from their surrounding scope. Understanding this concept helped me see how JavaScript handles context and function execution behind the scenes. This topic is especially important because it’s used in: Event handling Object-oriented programming Call, Apply, Bind React components Every day I’m realizing that JavaScript is not just about writing code — it’s about understanding how things work internally. Slowly building strong fundamentals 💪 #JavaScript #FrontendDeveloper #WebDevelopment #LearningInPublic #100DaysOfCode #WomenInTech

To view or add a comment, sign in

Explore content categories