Course contentsShow
← JavaScript
Lesson 576 of 2,72314. The 'this' KeywordFree lesson

Arrow Functions Cannot Be Constructors

Arrow functions lack a prototype and cannot be used with 'new'—they have no constructor behavior.

Arrow Functions Cannot Be Constructors

What you'll learn: Why arrow functions can't be used with the new keyword to create object instances.


The Missing Prototype

Arrow functions have a fundamentally different design than regular functions. They don't have their own prototype property, which means they cannot serve as constructors for object instances.

When you use the new keyword with a function, JavaScript does several things behind the scenes:

  1. Creates a new empty object
  2. Sets that object's prototype using the constructor's .prototype property
  3. Binds this to that new object
  4. Returns the new object

Arrow functions fail at step 2 and 3—they have no prototype to link to, and they don't bind this dynamically. They inherit this lexically from their surrounding context instead.


What This Means in Practice

// Regular function as constructor - WORKS
function Person(name) {
  this.name = name;
}
const john = new Person('John');
console.log(john.name); // 'John'

// Arrow function as constructor - ERROR
const Animal = (type) => {
  this.type = type;
};
const dog = new Animal('Dog'); // TypeError: Animal is not a constructor

You can verify this by checking for the prototype:

function regularFunc() {}
const arrowFunc = () => {};

console.log(regularFunc.prototype); // {}
console.log(arrowFunc.prototype);   // undefined

No prototype means no constructor behavior. JavaScript will throw a TypeError if you try to use new with an arrow function.


Key Takeaway: Arrow functions are lightweight and designed for callbacks, not object construction—they have no prototype property and cannot be called with new.