How to remove the last comma from string and replace it with a period in Javascript?
var str1="a,s,d,f,g,";
var str2=str1.replace(/,$/,".")
str2 will contain the string a,s,d,f,g. I hope you will find this tutorial very handy.
Source Code examples, error solution in Programming & learn online .Net, C, Java, C#, c++, basic of language, sql server , Ajax, Crystal Report, Html.
How to remove the last comma from string and replace it with a period in Javascript?
var str1="a,s,d,f,g,";
var str2=str1.replace(/,$/,".")
str2 will contain the string a,s,d,f,g. I hope you will find this tutorial very handy.
0 comments:
Post a Comment