DEV Community


Discussion on: JavaScript: Reduce the number of conditional operators used in the expression

stramel89 profile image
Michael Stramel

Definitely agree using every and some are the way to go. You could simplify further by using Boolean like so, conditionArray.every(Boolean)

pichardoj profile image
J. Pichardo

Nice, haven't tried it, however, won't it evaluate as true for Boolean being an object?