Skip to content

Latest commit

 

History

History
39 lines (23 loc) · 1.33 KB

File metadata and controls

39 lines (23 loc) · 1.33 KB

Comparison Operators

**You can evaluate a situation by comaring one value in the script to what you expect it might be. The result will be a boolean : true or false. **

Comparison operators

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.

Logical Operators

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

Loops

Loop Counters

A for loop uses a counter as a condition. This instructs the code to run a specified number of times. Here you can see the condition is made up of three statements:

  1. Initilaization : var i = 0 ;
  2. Condition : i < 10 ;
  3. Update : i++

Loop counters