📝 We ran into a fun little bug because we used JavaScript’s `reduce` wrong. Don’t be like us:

· · Web · 1 · 0 · 0

@domhabersack nice write-up 💪🏼 I get that JavaScript comes from a place where it wasn't foreseen that it'd be used the way it is used now, but values being true for existing is one of the pitfalls of the language I always trip over. And I can't think of a use-case where using truthiness is valid considering the potential for bugs. I'm sure there are some, but I just don't see it.

@masterpiece_911 They are few and far between, and honestly always feel hacky. It can make you seem really clever, but I’d recommend being explicit for better readability. I love `every` and `some` because of how much easier they are to understand. 😍

Sign in to participate in the conversation

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!