JSFiddle - React, Tailwind, and code Playground
by aslancods
HTML
<div id="element" >click me</div>
JavaScript
function foo(txt) {
alert(txt)
console.log(txt)
}
var element = document.getElementById("element");
element.addEventListener("click", function(){
foo("element");
});