Hello Thomas,
What an interesting question! The short answer is that expressions are evaluated as Javascript expressions and this is the behavior in Javascript. Here is a snippet I copied from a node session that confirms this:
> var missing = “”;
undefined
> [missing && false, false && missing, true || missing, missing || true];
[ ”, false, true, true ]
This is consistent with your explanation, just putting it another way.
You have probably also discovered that there are other places where the commutative property of ‘and’ and ‘or’ is not observed:
Although this behavior is consistent with expressions in the Javascript language, it is not consistent with boolean logic and likely to be confusing to students. I will file a bug. The delegation of CODAP’s expression language to Javascript is pretty fundamental to CODAP’s formula engine, so it may take a while to explore the implications elsewhere in CODAP.
Jonathan