Understanding Everything Be True Challenge

Hi fellows, I can’t understand this challenge will although I coded a Solution and this is it


function truthCheck(collection, pre) {
  var arrContainPre = [];
  for (var i = 0  ; i < collection.length ; i++){
      if (collection[i].hasOwnProperty(pre) === true){
        arrContainPre.push(collection[i]);
      }
  }
  //return collection[0].hasOwnProperty(pre);
  return collection.length === arrContainPre.length;
  //return arrContainPre ;
}

truthCheck([{"user": "Tinky-Winky", "sex": "male", "age": 0}, {"user": "Dipsy", "sex": "male", "age": 3}, {"user": "Laa-Laa", "sex": "female", "age": 5}, {"user": "Po", "sex": "female", "age": 4}], "age");

arrContainPre is to check the existence of the property in the objects. I think I got what you mean from Falsy bouncy Challenge. I will try it Thanks :slight_smile: