Find words which contains more than 3 e vowels: Difference between revisions

m
→‎{{header|JavaScript}}: Flipped order of a pair of names, for readability
(Added a JavaScript version)
m (→‎{{header|JavaScript}}: Flipped order of a pair of names, for readability)
Line 1,251:
// and none of its vowels are other than "e".
const
[eCountnoOtherVowels, noOtherVowelseCount] = [...w].reduce(
([nbool, booln], c) => bool
? "e" === c
? [bool, 1 + n, bool]
: "aiou".includes(c)
? [nfalse, falsen]
: [nbool, booln]
: [nfalse, falsen],
 
// Initial accumulator.
[0true, true0]
);
 
9,655

edits