1// use attribute .tagName, which returns a type e.g. DIV, BUTTON, LI etc.
2const functionName = () => {
3 if(e.target.tagName == 'BUTTON') {
4 console.log("It's a button";
5 } else {
6 console.log("It's not a button");
7 }
8}
9
10// if you prefer: function functionName (params) {action} instead of "e.target" use this