🤯 Qu’est-ce que this ? D’où vient-il, où va-t-il ?

Un voyage en profondeur dans le personnage le plus déroutant de JavaScript 😵‍💫 Toute personne qui apprend JavaScript a déjà vécu cette scène classique : « OK, j’ai compris this. »(Ajoute un event listener)« Non… en fait non. » Parce que this est : En bref : this est le personnage caméléon de JavaScript 🦎 […]

Continue Reading

🤯 What Is this? Where Does It Come From, Where Does It Go?

A Deep Dive into JavaScript’s Most Confusing Character 😵‍💫 Everyone learning JavaScript has lived through this classic scene: “I got it. I understand this.”(Adds an event listener)“Nope… I definitely don’t.” Because this is: Not fixedNot global (even though it sometimes looks like it)Not determined by where it’s writtenDetermined by how it’s called In short: this […]

Continue Reading

🤯 this Nedir? Nereden Gelir, Nereye Gider?

JavaScript’in En Kafa Karıştıran Karakterine Derinlemesine Bir Yolculuk 😵‍💫 JavaScript öğrenirken herkesin başına gelen klasik sahne: “Tamam, this’i anladım.”(Bir event listener ekler)“Hayır… anlamamışım.” Çünkü this: Kısaca: this, JS’in ortama göre kimlik değiştiren karakteridir 🦎 🥇 EN ÖNEMLİ KURAL (Bunu Okumadan Devam Etme) this, nerede yazıldığına göre değil,NASIL çağrıldığına göre belirlenir. Bu cümle: Şimdi bunu parça […]

Continue Reading