1 java String tempAvailableTime="1,2,"; tempAvailableTime = tempAvailableTime.substring(0,tempAvailableTime.length() - 1); 2 JavaScript let reStr = "1,2,"; reStr = reStr.substring(0,reStr.length - 1);