JSFiddle - React, Tailwind, and code Playground

HTML

<html>
<head>
<title>Test JS </title>
</head>
<body>
<div>
Testing ClassName Btn
</div>
<div>
<button class="hello-btn">
  Hello BTN 1
</button>
<button class="hello-btn">
  Hello BTN 2
</button>
<button class="hello-btn">
  Hello BTN 3
</button>
<button class="hello-btn">
  Hello BTN 4
</button>
</div>

</body>
</html>

JavaScript

window.onload = function(){
  var helloBtn = document.getElementsByClassName('hello-btn')[0];
  console.log(helloBtn);
    helloBtn.addEventListener('click', function handleClick(event) {
      console.log('btn clicked', event.target.innerText, event);
    });
   }