As one of the most popular programming languages currently being used all around the world, understanding the core of Javascript is essential. The ‘this’ keyword is one of the most difficult concepts to grasp. This blog post aims to break down the ‘this’ keyword into small and understandable bits.

What is ‘this’ in Javascript

The this keyword is, without doubt one of the most difficult Javascript concepts to understand. However, understanding it is key to being a great developer because it is an extremely common part of Javascript code. In simple terms,  this refers to the object it belongs to. It can also be defined as a property of an execution context, which is always a reference to an object when not in strict mode. It is worthy to note that the ‘this’ keyword finds usage mostly in the context of  object oriented programming. With that in mind, the ‘this’ keyword will refer to the object to which it belongs; This is true most of the times. Let us use an example to explain this better.

#Javascript #JSConcepts

How to Break down the 'this' keyword in Javascript easy?
19.70 GEEK