You are viewing a single comment's thread. Return to all comments →
You can make it shorter with a bit of chaining.
function birthdayCakeCandles(ar) { const max = Math.max(...ar); return ar.filter(c => c === max).length; }
Seems like cookies are disabled on this browser, please enable them to open this website
Birthday Cake Candles
You are viewing a single comment's thread. Return to all comments →
You can make it shorter with a bit of chaining.