Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endIndex – length(this). Otherwise returns false.
endsWith(searchString, endIndex?)
searchString
The string to be searched for at the end of this string.
endIndex optional
The index to stop searching at. If omitted, length(this) is used.
true if the given searchString occurs at the end of this string, otherwise false.
"spring".endsWith("ing")
true