Currently, {}<0 (or o<0 which o is an object) is true and then, {}>0, o>0 are false. It seems object is convert to empty string, then ""<0 are compared alphabetically.Document wrote:If either of the inputs is not a number, both are compared alphabetically
I think can't compare between object (or anything can't convert to number nor numerical string) and number.
I hope these comparison discriminant returns empty string.
3# wrote:Since condition of empty is treated as false, there still will be some conflict, even compare returns empty - need to use (a<0)=false to confirm false.
Maybe I over misused weak type, which simplify variable define and assign, I'd better check type first, if necessary.