DEV Community

Discussion on: Clean JavaScript - 10 Tips

Collapse
 
macsikora profile image
Pragmatic Maciej

The thing is that it doesn't hep in any way in terms of not controlling the data model, you have trouble if u do that by array or not. My examples of using .some show what I am able to accept in the code, but this examples also do not make any difference in terms of the code quality.

There is no, even single reason to change multi-conditions into multi-array of conditions. I disagree hard here because you have "Clean JavaScript" article title. This is not more clean, but alternative way of doing conditions. If I would see such in the code my first question would be - "Why?". And the only answer I see is - "Because I can"

PS. in terms of isEqual I agree, it is subjective, as point-free not always makes the code better.