Skip to main content

What is the this keyword?

Entry JavaScript
Quick Answer this refers to the context in which a function is called. In a method: this is the object. In a regular function: this is window (or undefined in strict mode). In arrow functions: this is inherited from the enclosing scope (lexical this). In event handlers: this is the element. The value of this is determined by how the function is invoked, not where it's defined.

Answer

this refers to current execution context. Arrow functions inherit this from their parent scope.

S
SugharaIQ Editorial Team Verified Answer

This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice