logoalt Hacker News

anyfooyesterday at 10:08 PM1 replyview on HN

> I failed a job interview once by using reduce() in a coding test. The reviewer didn't understand why I hadn't used a loop.

Honestly, sounds like the reviewer failed the interview, not the other way around.


Replies

baxuzyesterday at 10:10 PM

Nah. Reduce is less performant and less readable than a regular loop. In my anecdotal experience, only people who want to appear smart and minimize the number of characters prefer reduce.

show 1 reply