79439814

Date: 2025-02-14 15:26:24
Score: 1
Natty:
Report link

When using an arrow function, 'this' refers to the surrounding context. So no need to do that anymore!

element.addEventListener('click', () => {
     console.log(this); // 'this' refers to the surrounding context
});
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Starts with a question (0.5): When
  • Low reputation (0.5):
Posted by: RBILLC