191
rated 0 times
[
198]
[
7]
/ answers: 1 / hits: 38012
/ 11 Years ago, wed, may 8, 2013, 12:00:00
I have some code like:
var bar = foo().then(function success(value) {
// compute something from a value...
}, function failure(reason) {
// handle an error...
});
How do I bind the failure
function to the this
object in the context of bar
. I know I will have to use myFunc.bind(this)
but what do I substitute in place of myFunc
?
More From » promise