How to remove the last comma from string and replace it with a period in Javascript?

In this programming tutorial you will learn how to remove the last comma from string and replace it with a period in Javascript. I will use regular expression for it. Let's have a look over the following code snippet
How to remove the last comma from string and replace it with a period in Javascript?

str2 will contain the string a,s,d,f,g. I hope you will find this tutorial very handy.

So that's it. I love your feedback.

0 comments: