I'm trying to check an objects every entry's key and value in a if condition, but i cannot understand my result. What is the problem? Why is an undefined not false with "??" ?
const object = {undefined: "foo", B: "Bazz"}
console.log(Object.entries(object).every(([key, value]) => !!key && !!value))
//true
const object2 = {undefined: null, B: "Bazz"}
console.log(Object.entries(object2).every(([key, value]) => !!key && !!value))
//false
'undefined'is a string. btw, why do you expect a different result?