How to check if a string ends with a specific string or a character in JavaScript?
Originally posted here!
To check if a string ends with a specific string or a word, you can use the endsWith() string method in JavaScript.
Consider this string Hello, How are you?,
// a string
const str = "Hello, How are you?";
Let's check to see ...
melvingeorge-me.hashnode.dev3 min read