
bind() method creates a new function, when called has its this keyword set to the provided value Let’s have a look at a sample code, on how to use the bind() function: const person = { age: 20, getAge: function() { return this.age; } } const unBoundedGetAge = person.getAge; console.log(unBoundedGetAge()) If we run the code,… Read more »