WebTech-MERNG-2023

Mongo DB 6.0.10

this keyword

  1. The this keyword in JavaScript refers to an object. The object that is referred to by the this carries the currently running program.
  2. When a regular function is being referred to, this refers to the global object.
  3. In the case of an event, the element that received the event is referred to as this.
  4. call(), apply(), and bind() methods can all refer to any object using this.
  5. A regular function will always define its this value.
  6. The this keyword is handled differently by arrow functions. Since it lacks a context of its own, they are unable to define its own.
  7. this is based on the enclosing lexical scope for arrow functions.
  8. In regular functions, the object that is called the function was represented by the this keyword.