functionhydrate(sentence){consthowMany=(sentence.match(/(\d+)/g)||[]).reduce((acc,cur)=>acc+parseInt(cur),0),s=howMany===1?"":"es";return`${howMany} glass${s} of water`;}
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Discussion on: Daily Challenge #223 - Responsible Drinking
For further actions, you may consider blocking this person and/or reporting abuse