Hello Reader's you might have seen the coding standard with the common syntax | and || is used. These are the syntax used for checking the conditions and sub conditions. The first | is called as bit wise Operator. It is used to make the condition between two numbers. But the working difference is if the condition is true/false it will again check for another condition if applied where in case of '||' operator the if the condition is found true then it will not compare another conditions
For example:
if(condition1 || condition2 || condition3)
If condition1 is true, condition 2 and 3 will NOT be checked.
if(condition1 | condition2 | condition3)
Now in this condition all the conditions will be checked.
0 Comment(s)