js string replace at index code example
Example 1: js split string at index
"How are you?".slice(8, 11);
/*Output: you*/
Example 2: javascript string change character at index
String.prototype.replaceAt=function(index, char) {
var a = this.split("");
a[index] = char;
return a.join("");
}