How can I check if a string ends with a particular character in JavaScript?
Example: I have a string
var str = \"mystring#\";
I wa
If you're using lodash:
_.endsWith('abc', 'c'); // true
If not using lodash, you can borrow from its source.