youngz
Results
2
comments of
youngz
è·Ÿå¤§å®¶ä¸€æ ·ç”¨äº†æ£åˆ™ 🤔 ``` const getMaxContiniu = (str = '') => { const res = {}; let max = 0; arr = str.match(/(.)\1+/g) if (!arr) return res; arr.map((item) => { const...
> > > ``` > > > const arr = str.match(/(\w)\1*/g); > > > const maxLen = Math.max(...arr.map(s => s.length)); > > > const result = arr.reduce((pre, curr) => {...