How can I check if a string ends with a particular character in JavaScript?
Example: I have a string
var str = \"mystring#\";
I wa
For coffeescript
String::endsWith = (suffix) -> -1 != @indexOf suffix, @length - suffix.length