Related Post: Javascript Remove Character From String If Exists Javascript Remove Last Character From String If Exists