 Hi everyone, I'm Ram Krishna Patnaik and I work as a software engineer at Red Hat Bangalore with the middleware team and I'm going to talk about this keyword in JavaScript. This is one of my favorite programming jokes. After all these years of working with JavaScript, I still get confused regarding what this points to. As JavaScript developers, we are placed with many tools and libraries that abstract out the confusing bits of JavaScript for us and let us build amazing things easily at scale. While we can keep building things without knowing how JavaScript works under the hood, knowing them will indeed help us in the development process and identifying occasional weird behaviors. And this keyword is something we actively ignore. So in this presentation, we are going to see some common behaviors of this. Here is the most common use case. The keyword this points to the object which is executing the method. It is also known as implicit binding. Now the question arises, what if the function is not associated with any object? Let's jump to the next slide. When we have a method defined as a standalone method, it's this refers to the Windows object by default. Hence, this is known as default binding. If we try to run the code from previous slide in strict mode, we will see that this isn't referring to the Windows object. It simply points to nothing and hence returns undefined. The examples before show how the implicit and default binding work. Now we are going to see how we can explicitly bind a method to a particular object. Unlike the previous two bind mechanisms, the explicit binding gives us control over what this points to. There are three methods for explicit binding. Call, Apply and Bind, the last of which we might have seen many times while working with React. Now let's go through them one by one. In the given example, we have made the this of introduce method point to a given object using call. The first argument to call is for the object it should be bound to and rest of arguments are parameters to the method invoked by call. Then comes the Apply method which is almost similar to call. The only difference is that the arguments are needed to be passed as an array. The bind method is a little bit different from call and apply. While others invoke the method, bind creates a new function bound to the specified method. And then we can call the newly created method with its signature. Until now, we have discussed about normal function definitions. Now let's talk about fat arrow functions which were shipped with ES6. Arrow functions do not have their own this. They inherit the one from the parent scope. The example above is a standalone method. So here this will be bound to windows object as expected. Let's get to the next slide to see how it differs from normal method definitions. We always hear that arrow functions can't or should not be used as object methods. The reason is they aren't bound to the object. They are bound to the parent scope. Executing the example above, we can see that the method grid doesn't get the name from person object. It instead gets name defined in global context, which in this case is the windows object. Here is another elaborate example to understand difference between normal and fat arrow functions better. The code snippets have object methods that aim to print the property name using inner functions. The inner function in left one is defined as normal method. Hence, it is bound to the windows object and method gets name property defined at global level. Whereas for right, the arrow function inherits this from parent scope, which in this case is the outer function was this points to the object person only. So we get the person's name as desired. I hope the presentations and examples help you understand the concept of this a bit better. Here are some of the articles you may find useful for learning more about this. You can reach out to me via mail or twitter for any feedback or query. Thank you.