Get as e.target the exact element at which onClick is specified?
Apr 1, 2021
as we working on we knew that event.target,
get the exact element where we clicked.
even the smallest element too , like span.
so
The EventTarget
whose EventListeners
are currently being processed.
It gets the exact element where onclick event is begin triggered.
const elemClick= (event) => {
let elem = event.currentTarget;
}