How can I check if a string ends with a particular character in JavaScript?
Example: I have a string
var str = \"mystring#\";
I wa
function strEndsWith(str,suffix) { var reguex= new RegExp(suffix+'$'); if (str.match(reguex)!=null) return true; return false; }