Skip to content
JavaScript·Intermediate·Coding·1 min read

Does this point to the function that is running?

Short interview answer

No. this is a call-time value, not a pointer to the current function or necessarily the object where the function was defined. Lexical arrows are the exception in the sense that they inherit the surrounding this.

Key takeaway

Explain the underlying mental model clearly, then support it with a concrete example and its trade-offs.

← Back to The this keyword

Related questions