結果 : check if a string ends with a substring javascript