The following code comes up in an example for creating an interactive FAQ/Questions section, and I could follow along for the most part, but one of the things I didn’t follow was the purpose of the argument “e”. what does the “e” represent? what is it pointing towards? Is it acting like this when paired with .currentTarget ?
e is the conventional way of declaring “event”, here specifically meaning a click event attached to the buttons. e.currentTarget points towards the element that the event listener has been attached to.
Here’s some reading on Event.currentTarget at MDN
…the arrow function does not have its own this. this is resolved lexically, just like any other variable. That’s why the this of arrow functions is called lexical.