/**
* @param {string[]} patterns
* @param {string} word
* @return {number}
*/
var numOfStrings = function(patterns, word) {
return patterns.reduce( (cnt, pattern) => {
if(word.includes(pattern)) cnt += 1
return cnt
}, 0)
};
/**
* @param {string[]} patterns
* @param {string} word
* @return {number}
*/
var numOfStrings = function(patterns, word) {
return patterns.filter(e => word.includes(e)).length
};