Checks if value ends with searchString.
searchString
endsWith if value does not end with searchString.
endsWith
const question = endsWith("?");question("hey!"); // Error: endsWithquestion("really?"); // passes Copy
const question = endsWith("?");question("hey!"); // Error: endsWithquestion("really?"); // passes
The characters to be searched for at the end of value.
Checks if value ends with
searchString
.Throws
endsWith
if value does not end withsearchString
.Example