JSFiddle - React, Tailwind, and code Playground

JavaScript

var str = "this is a ttest";  // t  h  i  s   i  s   a   t  t  e  s  t
posn = 11
str = str.substr(0,posn-1) + str.substr(posn,str.length-posn)
console.log(str)