|
|
|
|
|
by flebron
4913 days ago
|
|
For 6), a question, is .bind not just returning a new function, which will .call your provided one with the supplied "this"? That is, I think it's better to reason about it not as an exception to the usual semantics, but as something that can already be done by any coder in the language itself, using the usual semantics. And thank you for 5), I didn't know it! :) |
|
On a pedantic note, due to complications with the new() operator, you can't actually implement .bind() in JS using only .call() and .apply() and get the prototype of the resulting objects right.