✅ [JavaScript] Straightforward Solution || Simple & Understandable || Fast
Runtime: 68 ms, faster than 91.85% of JavaScript online submissions for Count Prefixes of a Given String.\nMemory Usage: 43 MB, less than 40.00% of JavaScript o
**Runtime: 68 ms, faster than 91.85% of JavaScript online submissions for Count Prefixes of a Given String.\nMemory Usage: 43 MB, less than 40.00% of JavaScript online submissions for Count Prefixes of a Given String.**\n\n```\nvar countPrefixes = function(words, s) {\n    let count = 0\n    for (i of words) {\n        if (s.startsWith(i)) {\n            count++\n        }\n    } \n    return count\n};\n```
['String', 'JavaScript']