Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript string change character at index

String.prototype.replaceAt=function(index, char) {
    var a = this.split("");
    a[index] = char;
    return a.join("");
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #string #change #character #index
ADD COMMENT
Topic
Name
6+6 =