javascript test vs search code example
Example 1: javascript inbuilt funcctions to match the word and return boolean
String.prototype.isMatch = function(s){
return this.match(s)!==null
}
Example 2: js match true false
/match/.test('string match') // true