faster than 100.00% Intuitive Javascript Solution
Solution 1 - save words into an array, then get length of the array;\n\nconst countConsistentStrings = (allowed, words) => {\n  let result = [];\n\n  for (let i
Solution 1 - save words into an array, then get length of the array;\n```\nconst countConsistentStrings = (allowed, words) => {\n  let result = [];\n\n  for (let i = 0; i < words.length; i++) {\n    const word = words[i]\n\n    for (let j = 0; j < word.length; j++) {\n      const char = word[j];\n\n      if (!allowed.includes(char)) break;\n      else if (j === word.length - 1) result.push(word)\n    }\n  }\n\n  return result.length;\n};\n```\n\nSolution 2 - count number of allowed words\n\n```\nconst countConsistentStrings = (allowed, words) => {\n\tlet count = 0;\n\n\twords.forEach(word => {\n\t\tfor (let j = 0; j < word.length; j++) {\n\t\t\tconst char = word[j];\n\n\t\t\tif (!allowed.includes(char)) break;\n\t\t\telse if (j === word.length - 1) count++;\n\t\t}\n\t});\n\n\treturn count;\n};\n```
['JavaScript']