DEV Community

Discussion on: Solving "Everything Be True" / freeCodeCamp Algorithm Challenges

Collapse
ttatsf profile image
tatsuo fukuchi • Edited on
checkedArr.includes(false) ? false : true

is equivalent to:

! checkedArr.includes(false)

It's like something verbose.

And , here another way:

const truthCheck = (collection, pre) =>
  collection.every(
    e => e[pre]
  )
Collapse
sinemsungur profile image
Sinem Sungur

does it check true of false? if it does, how?