cara memeriksa js jika elemen adalah tombol atau sedang

// use attribute .tagName, which returns a type e.g. DIV, BUTTON, LI etc.
const functionName = () => {
	if(e.target.tagName == 'BUTTON') {
    console.log("It's a button";
	} else {
	    console.log("It's not a button");
	}
}

// if you prefer: function functionName (params) {action} instead of "e.target" use this
Disgusted Dunlin