What is the this keyword in JavaScript?

Updated May 6, 2026

Short answer

this refers to the execution context object.

Deep explanation

Its value depends on how a function is called (global, object, constructor, or arrow function).

Real-world example

Used in class methods and event handlers.

Common mistakes

  • Expecting lexical binding in normal functions.

Follow-up questions

  • How does arrow function affect this?
  • What is strict mode behavior?

More JavaScript interview questions

View all →