The string to inspect.
The string to search for.
The position to search up to.
Returns true
if string
ends with target
,
else false
.
5.7.0
[[includes]],[[startsWith]]
endsWith('abc', 'c')
// => true
endsWith('abc', 'b')
// => false
endsWith('abc', 'b', 2)
// => true
Checks if
string
ends with the given target string.