I have an object like this:
var obj1 = {foo: false, bar: ''};
var obj2 = {foo: false, bar: '1'};
var obj3 = {foo: true, bar: ''};
var obj4 = {foo: true, bar: '1'};
I need a simple function to check these objects if all their values ββare false or not. In this example, only obj1 should cause a false error, because all their values ββare false. obj2, obj3 and obj4 have at least one value that is true.
Is there a simple solution for this?
source
share