JSFiddle - React, Tailwind, and code Playground

HTML

<a onclick="foo1()">
  foo1
</a>
<a onclick="foo2()">
  foo2
</a>

JavaScript

function foo1(){
  console.log("foo1 called..");
}

var foo2 = function(){
  console.log("foo2 called..");
}