JSFiddle - React, Tailwind, and code Playground
HTML
in bounds: <div id="inbounds"></div>
<br />
out of bounds: <div id="outbounds"></div>
JavaScript
var s = '01234';
$('#inbounds').text(s.charAt(2));
$('#outbounds').text(s.charAt(10));
in bounds: <div id="inbounds"></div>
<br />
out of bounds: <div id="outbounds"></div>
var s = '01234';
$('#inbounds').text(s.charAt(2));
$('#outbounds').text(s.charAt(10));