© 2026 LinearBytes Inc.
Search posts, tags, users, and pages
Peter Scheler
JS enthusiast
This shouldn't be necessary because Function.prototype.bind() is very common.
If you really need it (for ES3 for example) there is a polyfill on the MDN page.
Atul Sharma
Full Stack Developer | Cloud Native Applications
Yes, bind is very common. Just looking it for interview purpose.
Atul Sharma Ok.
My modern quick solution would be:
Object.defineProperty(Function.prototype, 'bind', { value(self, ...bindArgs) { return (...args) => this.call(self, ...bindArgs, ...args) } })