You can do it with regex easily,
var str1 = "Notion,Data,Identity,".replace(/.$/,".")
.$ will match any character at the end of a string.
You can do it with regex easily,
var str1 = "Notion,Data,Identity,".replace(/.$/,".")
.$ will match any character at the end of a string.