re: JavaScript: Reduce the number of conditional operators used in the expression VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Hi @kvharish , I like what you are trying to do, however wouldn't it be better to make use of the array functions like every or some?, that way you...
 

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

 

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

code of conduct - report abuse