JSFiddle - React, Tailwind, and code Playground

by lollero

HTML

<button>Click me</button>

JavaScript

$(document).ready(function() {

    $("button").click(function() {

        // True = alert says Hello
        // False ( or empty ) = Nothing happens
        myFunc(true);

    });

    function myFunc( a ) {
    
        a && alert('Hello!');
    
    }
    
});