2 ms·
There is an error in this article: const sayThis = _ => console.log(this) const boundFunc = sayThis.bind({hippy: 'hipster'}) boundFunc() Because you use
by chrismorgan 9y ago
There is an error in this article:
const sayThis = _ => console.log(this)
const boundFunc = sayThis.bind({hippy: 'hipster'})
boundFunc()
Because you used an arrow function, `this` is not {hippy: 'hipster'}. You can’t rebind functions; once they’re bound, they’re bound.