String endsWith example

String endsWith is used to check if a String ends with the given suffix.

endsWith() method returns a boolean value based on the suffix passed

String endsWith example

Output

Reference

1. String API