undefined == undefined is true. But undefined >= undefined is false?

The >= operator is essentially the negation of the < operator. And both invoke the Abstract Relational Comparison Algorithm which returns undefined for undefined >= undefined as defined in step 3 (a to c). Actually, you can also see that the greater-than(-or-equal) and less-than(-or-equal) operators are only meant to work with either numbers or strings.

Then in the 6. step of the specification of the >= operator, you can see why it returns false:

If r is true or undefined, return false. Otherwise, return true.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)