[JavaScript] 1 line solution
\nvar prefixCount = function(words, pref) {\n    return words.filter(word => word.slice(0, pref.length) === pref).length;\n};\n
```\nvar prefixCount = function(words, pref) {\n    return words.filter(word => word.slice(0, pref.length) === pref).length;\n};\n```
['JavaScript']