I have the following function to add splice to a string:
splice
String.prototype.splice = function(index, howManyToDelete, stringToInsert) { var ch
You can't do that. You can't change the value of a string in the way that you change the content of an array.
Look at the other string methods, and how they return the new string value rather than changing the string in place.