2 ms·
Won't the arrow function not bind `this` to the DOM element, causing it to refer to the window object? I think you have to use a real `function`, `function(){th
by bobbylarrybobby 6y ago
Won't the arrow function not bind `this` to the DOM element, causing it to refer to the window object? I think you have to use a real `function`, `function(){this.remove()}`
- deniz-a 6y agoArrow functions have the same `this` as the scope where they are declared (in this case, an onclick attribute). Both would work in this case.