How to Remove the Last Character from a String in JavaScript | CodeTrail