JSFiddle - React, Tailwind, and code Playground

JavaScript

(function(){    
    var i=0;    
    $('<button type="button"/>').text('i+1 = ?').appendTo('BODY').click(function(){
        alert( ++i );
    });
})();