結果 : check last character of string javascript