endsWith

endsWith(string string, string suffix) → boolean endsWith
Checks whether given string ends with given suffix.

Determines whether the string string ends with the string suffix.

Parameters
Return
Examples

endsWith("Hello", "ello") // true endsWith("Hello", "Hell") // false

See also

startsWith