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

this in Arrow Functions

How does 'this' behave in arrow functions?

Answer options

  • It points to the global object
  • It always points to undefined
  • It inherits 'this' from the surrounding lexical scope
  • It points to a new object
Show the answer

Correct answer:

  • It inherits 'this' from the surrounding lexical scope