結果 : remove substring from end of string javascript