QuizNot attempted
Arrow function this
1–4 to choose, Enter to submit
Show answer & explanation
Correct answer:
- They take
thisfrom the enclosing (lexical) function and call/apply/bind cannot change it
- Arrows have no own
this - they capture it lexically from the enclosing function or module scope, and
call/apply/bindcan't change it. - Not 'the object they are defined in': an object literal isn't a scope, so an arrow property gets the outer
this. - Not 'set by the caller': that describes regular functions.
- Not constructors: arrows have no
prototypeor[[Construct]], sonewthrows TypeError.