JSFiddle - React, Tailwind, and code Playground

HTML

<button id="btn1" onclick="doSomething1();return false;">Call doSomething1 method</button>
<button id="btn2" onclick="doSomething2();return false;">Call doSomething2 method</button>

JavaScript

function doSomething1() {
  alert("hi 1");
}

function doSomething2() {
  alert("hi 2");
}