What are the difference between "==" and "==="?

The == will not check the type of operands whereas === checks both type and value of the operands.

Other way of saying is, === will convert the operands to same type and then do the comparison. But === does not do any conversion. It simply return false if any of them in different type.

No comments:

Post a Comment

Labels