JSFiddle - React, Tailwind, and code Playground
HTML
<button>Button</button>
JavaScript
var play = true;
$("button").click(function(){
if (play){
alert("play");
play = false;
} else {
alert("pause");
play = true;
}
});