JavaScript Objects
What is (this)? In JavaScript, the this keyword refers to an object. Which object depends on how this is being invoked (used or called). The this keyword refers to different objects depending on how it is used: In an object method, this refers to the object.Alone, this refers to the global object.In a function, this …