JSFiddle - React, Tailwind, and code Playground

by Kevin Faulhaber

HTML

<button id="click">Click me</button>

JavaScript

var but = document.getElementById('click');

but.onclick = main('hello');

/*but.onclick = function(e){
        alert(message);
    }*/

function main(message){
    alert(message);
    return function(e){
        alert(message);
    }
};