4 ms·
Or if you like to live dangerously: str.split(',').filter(n => +n > 5).length
by worksonmine 3y ago
Or if you like to live dangerously:
str.split(',').filter(n => +n > 5).length
- dumbo-octopus 3y agoNot all that dangerous, tbh. My main concern would be NaN potentially cascading through, but not only is `NaN > 5` false, `!!NaN` is too.