Question · JavaScript and TypeScript course · Module 2: Functions, Arrays and Objects

this Context in JavaScript

What does the 'this' keyword mean in JavaScript?

Answer options

  • It is used to create new variables
  • It is an alias for the self variable
  • It always points to the window object
  • It refers to the current object in whose context it is called
Show the answer

Correct answer:

  • It refers to the current object in whose context it is called