Take the text before bindex and concatenate with text after eindex, like:
var S="hi how are you";
var bindex = 2; var eindex = 6;
S = S.substr(0, bindex) + S.substr(eindex);
S is now “hi are you”
Take the text before bindex and concatenate with text after eindex, like:
var S="hi how are you";
var bindex = 2; var eindex = 6;
S = S.substr(0, bindex) + S.substr(eindex);
S is now “hi are you”