When should you use arrow functions vs regular functions in JavaScript?
Use arrows for short callbacks and when you want lexical this (inside methods, constructors). Use regular functions for object methods (this should be the object), constructors (new), generators (yield), and when you need the arguments object.
Verify This Answer
Cross-check this information using these trusted sources:
More FAQs in Arrow Functions vs Regular Functions: Complete Comparison
Arrow functions have lexical this (inherited from the enclosing scope), no own arguments object, cannot be used as constructors (no new), and no prototype. Regular functions have call-time this, own arguments, can be constructors, and have a prototype.
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 or a prototype property.
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
