Propositional logic in javascript, what could go wrong