javascript - AngularJS: delete charAt last index of "," -


how write code in angularjs delete character @ last index of ",".

here equivalent java code:

stringbuilder.deletecharat(stringbuilder.lastindexof(",")); 

please help.

you

str = str.replace(/,([^,]*)$/, "$1"); 

or

var pos = str.lastindexof(","); str = str.substr(0, pos) + str.substr(pos + 1); 

Comments

Popular posts from this blog

python 2.7 - Chat Solution for Mobile App -

jquery - Detect current Section with javascript -