Short JavaScript Solution Using Regex
Found these solution helpful? Consider showing support by upvoting this post.\nHave a question? Kindly leave a comment below.\nThank you and happy hacking!\n\nv
Found these solution helpful? Consider showing support by upvoting this post.\nHave a question? Kindly leave a comment below.\nThank you and happy hacking!\n```\nvar countConsistentStrings = function (allowed, words) {\n    const re = new RegExp(`^[${allowed}]+$`);\n    let count = 0\n\n    words.forEach(word => {\n        if (word.match(re)) count++\n    })\n\n    return count;\n};\n```
['JavaScript']