Why is 1===1===1 false?

Yes, you’re exactly right. Here you have two equality checks, which have the same operator precedence. First one evaluates first, then its result applies to the next equality check.

1===1===1is the same as (1===1)===1 which is true===1 which is false, because here you check by values AND their types. 1==1==1 will result in true, because it checks equality by values only, so 1==1==1 equal to (1==1)==1 equal to true==1 equal to true.

Leave a Comment

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