What Is This?
Javascript can be a pretty illusive language. It gives you objects, but it is not what traditional object-oriented programming languages are like. It gives you arrays, but their typeof is not "array". With enough time spent learning and using Javascript, these nuances start to feel natural. But for anyone who is new to this programming language, things can get quite frustrating very fast. In Javascript, the keyword this is quite different from how this same keyword behaves in other programming languages.
In this article, we will take a look at how the keyword this behaves in Javascript in different contexts and in different modes.