Delete Last Character In String Javascript