Can arrow functions be used as constructors?

  • No
  • Yes
  • Only in ES6
  • Only in ES5
No, arrow functions cannot be used as constructors in JavaScript. Unlike regular functions, arrow functions do not have their own 'this' binding, and they cannot be used with the 'new' keyword to create instances of objects. Arrow functions are primarily used for creating concise function expressions.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *