Can you call an arrow function with new in JavaScript?
No. Arrow functions cannot be used as constructors. Calling new ArrowFn() throws TypeError: ArrowFn is not a constructor. They do not have a [[Construct]] internal method.
Verify This Answer
Cross-check this information using these trusted sources:
More FAQs in Function Declarations vs Expressions vs Arrows in JavaScript
Declarations are hoisted with their full body. Expressions are variable-assigned (variable hoisting only). Arrows are always expressions with lexical this, no arguments object, and cannot be used as constructors.
No. Arrow functions inherit this from their enclosing lexical scope. call, apply, and bind cannot change an arrow's this. This is why arrows fix the this-in-callback bug inside methods and constructors.
No. Arrow functions do not have their own arguments object. If you reference arguments inside an arrow, it refers to the enclosing regular function's arguments. Use rest parameters (...args) in arrows instead.
Still have questions?
Browse all our FAQs or reach out to our support team
