-4

Check String value existing or not useing string endwith methods

1 Answers1

1

Javascript endsWith() method

This method helps to check which sentence uses in a substring in the last position.

Note: The ends with the method is also case-sensitive

const dialog = "I will must tech you who am i?"
console.log(dialog.endsWith("i?")) //true
console.log(dialog.endsWith("i")) //false