Free Pascal <-> JavaScript | Logical and

Free Pascal

and

Description

par1 and par2
Used keywords: and

Input


Output

If the first operand is false, then the second operand is not evaluated.

Examples

Free Pascal

In the source code you can find the equivalent of the above table, for easier orientation at the end of each line is a comment which shows the result.
a1 := false and false; // a1 = false
a2 := false and true; // a2 = false
a3 := true and false; // a3 = false
a4 := true and true;  // a4 = true

Free Pascal

Even one example in what situations we can use the operation logical and:
a and b
a and true
10 >a and a>5
.
JavaScript

&&

Description

par1 && par2
Used keywords: &&

Input


Output

If the first operand is false, then the second operand is not evaluated.

Examples

JavaScript

In the source code you can find the equivalent of the above table, for easier orientation at the end of each line is a comment which shows the result.
a1 = false && false; // a1 = false
a2 = false && true; // a2 = false
a3 = true && false; // a3 = false
a4 = true && true;  // a4 = true

JavaScript

Even one example in what situations we can use the operation logical and:
a && b
a && true
10 >a && a>5

You can find it in the following collections: logical operators
Languages: en hu cz sk