Question 3 of 5Pro Only

How does the "this" keyword work in JavaScript? What are the different ways its value can be determined?

Sample answer preview

The this keyword in JavaScript refers to the execution context of a function. Unlike other languages where this is fixed, in JavaScript it depends on how the function is called. There are several rules that determine what this refers to. Default binding.

thisbindcallapplyarrow functionexecution context

Unlock the full answer

Get the complete model answer, key points, common pitfalls, and access to 4+ more Frontend Developer interview questions.

Upgrade to Pro

Starting at $19/month • Cancel anytime