Arrow Functions Cannot Be Constructors
What you'll learn: Arrow functions lack the ability to create new object instances with new, unlike regular functions.
The Core Difference
In JavaScript, regular functions can act as constructors — templates for creating new objects. When you call a regular function with the new keyword, JavaScript creates a brand-new object and binds this inside that function to the new object.
Arrow functions, however, cannot be used as constructors. If you try to call an arrow function with new, JavaScript throws a TypeError.
Why Arrow Functions Can't Be Constructors
Arrow functions were designed to be lightweight and lexically bind this from their surrounding context. They don't have their own this binding and lack a prototype property — both essential for constructor behavior.
Think of it like this: regular functions are Swiss Army knives (multipurpose), while arrow functions are specialized tools. They traded constructor capability for simpler this behavior.
Example
// Regular function as constructor - WORKS
function RegularPerson(name) {
this.name = name;
}
const person1 = new RegularPerson('Alice');
console.log(person1.name); // "Alice"
// Arrow function as constructor - FAILS
const ArrowPerson = (name) => {
this.name = name;
};
// const person2 = new ArrowPerson('Bob'); // TypeError: ArrowPerson is not a constructor
You can verify this by checking the prototype property:
function Regular() {}
const Arrow = () => {};
console.log(Regular.prototype); // { constructor: Regular }
console.log(Arrow.prototype); // undefined
Key Takeaway: Arrow functions cannot be called with new and lack a prototype property, making them unsuitable as constructors — use regular functions when you need constructor behavior.