What is the this keyword?

this refers to the object from which a function is called. Its value varies depending on the execution context, like global (window), object, or event context.

const obj = {
  name: "Alice",
  greet() {
    console.log("Hello, " + this.name);
  }
};
obj.greet(); // Hello, Alice