JSFiddle - React, Tailwind, and code Playground
by jim ulle
HTML
<button onclick="x()">run it</button>
JavaScript
function check() {
//validation code
return true;
}
function x() {
if (check()) {
//check is true, execute this code
alert('hello');
}
}