How do I compare a part of a string - for example if I want to compare if string A is part of string B. I would like to find out this: When string A = \"abcd\"
string A = \"abcd\"
Using regular expression might help you.
var patt = new RegExp(stringA, 'i'); if(stringB.match(patt)){ return true; }