How can i replace prototype and make the same code below to work? in other words i wanna write a code with the same meaning/logic without using prototype.
String.prototype.replaceAt = function(index, character) {
return this.substr(0, index) + character +
this.substr(index + character.length);
}