let f = Array.bind({a:1})
f.prototype === undefined // true
typeof f === 'function' // true
Almost all of JavaScript's functions have a prototype property. I'm wondering what happens in bind. Did it remove prototype?
let f = Array.bind({a:1})
f.prototype === undefined // true
typeof f === 'function' // true
Almost all of JavaScript's functions have a prototype property. I'm wondering what happens in bind. Did it remove prototype?
It's in the official JavaScript spec, ECMAScript 2020:
NOTE 1 Function objects created using
Function.prototype.bindare exotic objects. They also do not have aprototypeproperty.
These so-called "bound function exotic objects" are not regular Function objects.