JSFiddle - React, Tailwind, and code Playground

by CarambaMoreno

HTML

<input id="textbox" type="text" />

JavaScript

var firstChar = $('#textbox').val().substr(0, 1);


$( "#textbox" ).change(function() {
alert( firstChar );
});