javascript inbuilt funcctions to match the word and return boolean

JavaScript
String.prototype.isMatch = function(s){
   return this.match(s)!==null 
}
Source

Also in JavaScript: