I have a string. It's just like;
var str = "This is an example sentence, thanks.";
I want to change every fifth element of this string.
for(var i=5; i<=str.length; i=i+5)
{
str[i]='X'; // it doesn't work, I need something like that
}
So I want str to be "ThisXis aX exaXple XenteXce, XhankX."
Is there any way to do that?