JSFiddle - React, Tailwind, and code Playground

HTML

<html>
<head>
<title>Example title</title>
</head>
<body>
<button id="btnTest">Click me</button>
</body>
</html>

JavaScript

document.getElementById("btnTest").addEventListener("click", (event) => {
	console.log(event);
  alert("I just clicked the button");
});