JSFiddle - React, Tailwind, and code Playground

HTML

<html>
    <head></head>
    <body>
        <input type="text" value="10" id="number"/>
        <input type="button" id="increment" value="Decrement"/>
    </body>
</html>

JavaScript

$(document).ready(function(){
    $("#increment").click(function(){
        var $n = $("#number");
        $n.val(Number($n.val())-1);
    }); 
});