Vacuous Truth in JS
August 22, 2025
While testing a permissions function, I discovered something curious about Array.prototype.every. It checks if all items satisfy a condition, returning false if any don’t and true if they all do. But with an empty array, it still returns true. This is explained by vacuous truth: since no items exist, there are no counterexamples to disprove the condition.... read more