everything be true freecodecamp code example
Example: everything be true freecodecamp
const truthCheck = (collection, pre) =>
collection.every(elem => elem.hasOwnProperty(pre) && elem[pre]);
const truthCheck = (collection, pre) =>
collection.every(elem => elem.hasOwnProperty(pre) && elem[pre]);