Relative newcomer to Javascript and looking for a way to remove the last character of a string if it is a colon.
I know myString = myString.replace(\'/^\\\\:/\');<
myString = myString.replace(\'/^\\\\:/\');<
try simply with
myString = myString.replace(/:$/, '');
this will remove : when it is at the end of the string
: