function every(collection, pre) {
// Is everyone being true?
function juge(n){
if(n)return true;
else return false;
}
var newarr=[];
collection.forEach(val=>newarr.push(val[pre]))
return newarr.every(juge);
}
every([{"user": "Tinky-Winky", "sex": "male"}, {"user": "Dipsy"}, {"user": "Laa-Laa", "sex": "female"}, {"user": "Po", "sex": "female"}], "sex");