• adrian783@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    2 equal signs will coerce the second operand into the type of first operand then do a comparison of it can. so 1 == “1” is true. this leads to strange bugs.

    3 equal signs do not do implicit type conversion, cuts down on weird bugs. 1===“1” is false.