JSFiddle - React, Tailwind, and code Playground

by charlescarver

HTML

<button>Button</button>

JavaScript

var play = true;
$("button").click(function(){
    if (play){
        alert("play");
        play = false;
    } else {
        alert("pause");
        play = true;
    }
});