JSFiddle - React, Tailwind, and code Playground
by Roshan Jha
HTML
<input type="text" value="hello"/>
<button id="btn">CLICK</button>
JavaScript
$("#btn").click(function(){
$("input").val($("input").val().substring(0, $("input").val().length - 1))
})