The statement "All my hats are green" would map to
things.every(thing => thing.type != 'hat' || thing.color == 'green')
The negated form would then be
things.some(thing => thing.type == 'hat' && thing.color != 'green')
The statement "All my hats are green" would map to
i.e., everything the person owns must either be green or, if it isn't green, it must not be a hat since all hats are green.The negated form would then be
i.e., there are some hats that are not green.