DEV Community


Discussion on: An Easy Explanation to Prototypal Delegation in JavaScript

frondor profile image
Federico Vázquez

My 0.50c about the constructor section: arrow functions don't have prototype. Neither bound functions, but the later can be constructables, unlike arrow functions. It's because of the [[Constructor]] internal method.
For instance: var fn = (function () {}).bind(Array); new fn() works although the result of the bind call is an "exotic object" without prototype. Now, the following example throws an error, because arrow functions lacks said internal method: var fn = (() => {}).bind(Array); new fn()