I need to write JS function which returns true if string contains - depreciated
in its last otherwise false.
For example:
var somestring = "string value - depreciated";
function should return true in above example.
function isDepreciated(var S)
{
//Need to check for substring in last
//return true or false
}
One possible solution is to use search
function but that means that if - depreciated
comes within string then it will also return true. I really need to find weather substring is in last or not.
Please help.