title: Javascript: Remove last character if a colon
body: <p>Relative newcomer to Javascript and looking for a way to remove the last character of a string if it is a colon.</p>
  
  <p>I know <code>myString = myString.replace('/^\\:/');</code> will work for the start of the line but not sure how to swap in the <code>$</code> character to change to the end of a line… can anybody correct it?</p>
  
  <p>Thanks</p>