Replace
replace( index, num, subStr )
Replaces characters at indices index
to index + num - 1
with a copy of subStr
.
// userText is "You have many gifts"
userText.replace(9, 4, "a plethora of");
// Now "You have a plethora of gifts"
Replaces characters at indices index
to index + num - 1
with a copy of subStr
.
// userText is "You have many gifts"
userText.replace(9, 4, "a plethora of");
// Now "You have a plethora of gifts"