LeetCodeCount Prefixes of a Given StringCount Prefixes of a Given StringEasyArrayStringSolution export function countPrefixes(words: string[], s: string): number { return words.reduce((prev, word) => (s.startsWith(word) ? prev + 1 : prev), 0); }LeetCodeCount Prefixes of a Given Stringhttps://leetcode.com/problems/count-prefixes-of-a-given-string