Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

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.


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: