There is some variable with a string, in it you need to delete one character by index (randomly obtained through Math.random() and written to a variable), how to do this if the strings in javascript are of immutable type. The replace() function cannot be done as this function replaces by the value itself and not by the index.
var string = "Lorem ipsum dolor", a = Math.floor(Math.random()*string.length);