Skip to content

Instantly share code, notes, and snippets.

@Nasah-Kuma
Created September 29, 2022 06:45
Embed
What would you like to do?
function birthdayCakeCandles(candles) {
const max = Math.max(...candles);
let counter = 0;
for(let candle of candles) {
if (candle === max) counter++;
}
return counter;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment