I need to replace a string by range
Example:
string = "this is a string";//I need to replace index 0 to 3 whith another string Ex.:"that"
result = "that is a string";
but this need to be dinamically. Cant be replace a fixed word …need be by range
I have tried
result = string.replaceAt(0, 'that');
but this replace only the first character and I want the first to third
1 Answer