Remove Last Element From String Javascript Programiz