Because it is a valid argument that does not make sense. But this does not make sense at the SEMANTIC level, and not at the syntax.
Here is an example:
1+1=42
This is wrong, but it is wrong in a different way than, say:
42 1 1 + =
You can read the first as an arithmetic equation (one plus one equals forty two). Second, you cannot even read.
The same thing happens here. NaN=300; operator NaN=300; can be read in Javascript as "have NaN indicates a value of 300. But when the parser sends this request to the engine, the engine goes" No, can't do it. "
Michael Bar-Sinai
source share