DEV Community

loading...

Discussion on: Daily Challenge #80 - Longest Vowel Change

Collapse
willsmart profile image
willsmart • Edited

The new JS function matchAll is going to be really useful.
Here's a JS quickie

longestVowelRunLength = string => [...string.matchAll(/[aeiou]+/g)].reduce((acc, [match]) => Math.max(acc, match.length), 0)
Forem Open with the Forem app