Skip to the content.

«««< HEAD

======= «««< HEAD

677b0122a05c371597a6d207176fdeb91831804b

Comparision operation

Evaluation conditions

** You can evaluate a situation by comparing one value in the script to what you expect it might be. **

** *( The result will be boolean : True \ False ) * **

== != === !==
** Is equal to ** ** Is not equal to ** ** Strict equal to ** ** Strict not equal to **
** The operator compares two values or booleans to see if they are in same ** ** The operator compares two values or booleans to see if they are not in same ** ** compare valuse and check data type are same ** ** compare valuse and check data type are same **

image

# Logical Operator

Comparision operator usually return single valuse of * True * or * False *

** && ** ** Or ** ** ! **
** Test more than one condition ** ** Test at least one condition ** ** Takes a single boolean value and invert it **

image

Loops

Check a condition if it returns true , a code block will run . Then the condition will be checked again and if it still returns true . It repeats until the condition returns false .

** For ** ** While ** ** Do while **
** Run code a spacific number of time ** ** If you don’t know how many times the code should run ** ** Simillar to while but it will run the ststment insid the curly braces at least once , even the condition false **

image

=======

Comparision operation

Evaluation conditions

You can evaluate a situation by comparing one value in the script to what you expect it might be.

( The result will be boolean : True \ False )

== != === !==
Is equal to Is not equal to Strict equal to Strict not equal to
The operator compares two values or booleans to see if they are in same The operator compares two values or booleans to see if they are not in same **compare valuse and check data type are same ** compare valuse and check data type are same

image

# Logical Operator

Comparision operator usually return single valuse of True or False

&& Or !
Test more than one condition Test at least one condition Takes a single boolean value and invert it

image

Loops

Check a condition if it returns true , a code block will run . Then the condition will be checked again and if it still returns true . It repeats until the condition returns false .

For While Do while
Run code a spacific number of time If you don’t know how many times the code should run Simillar to while but it will run the ststment insid the curly braces at least once , even the condition false

image

6dfaab613c777ec546074fe0a6c53ff0479fd2f1