Non -!
Returns False if an operand is an object;
Returns true if an operand is an empty string;
Returns False if an operand is a non-empty string;
Returns true if an operand is a numeric value of 0;
Returns False if an operand is an arbitrary non-0 character;
Returns true if an operand is null;
Returns true if an operand is Nan;
Returns true if an operand is undefined;
Implicit conversion: ', 0,undefined,nan,false,null default conversion to FALSE! Time-varying to true
and &&
(1) For Boolean values, logic and is very simple, as long as there is a false, return false;
(2) For cases where the Boolean value is not true:
Returns a second number if the first operand is an object
If the second operand is an object, the object is returned only if the value of the first operand evaluates to true;
If the first two operands are objects, the second operand is returned
Returns null if one of the operands is null
If one of the operands is Nan, the first Nan is returned
Returns undefined if the first operand is undefined
or | |
(1) For Boolean values, logical or very simple, as long as there is a true, return true;
(2) For cases where the Boolean value is not true:
If the first operand is an object, the first operand is returned
Returns the second operand if the evaluation result of the first operand is false
If two operands are objects, the first operand is returned
Returns NULL if two operands are null
If two operands are Nan, a nan is returned
If two operands are undefined, the undefined is returned
JS logical operation