Skip to content

Latest commit

 

History

History
32 lines (15 loc) · 1.15 KB

File metadata and controls

32 lines (15 loc) · 1.15 KB

Logical Operators

The Comparison operators usually return single values of true or fales. The Logical operators allow you to compare the resultsof more than one Comparison operator.

Loops

Loops check a condition,if it return true . a code block will run. Then the condition will be checked agian and if it still returns true.the code block will run agian.it repeats until the condition returns false.

There are three common types of loops :

1- for 2- while 3- Do while

LOGICAL OPERATORS

LOGICAL AND (&&) **The logical AND (&&) operator (logical conjunction) for a set of operands is true if and only if all of its operands are true. It is typically used with Boolean (logical) values. When it is, it returns a Boolean value.

LOGICAL OR (||)

**The logical OR (||) operator (logical disjunction) for a set of operands is true if and only if one or more of its operands is true. It is typically used with Boolean (logical) values. When it is, it returns a Boolean value.

LOGICAL NOT (!)

**The logical NOT (!) operator (logical complement, negation) takes truth to falsity and vice versa. It is typically used with Boolean (logical) values.