The web site hold my reading notes in code 201.
Expressions and Operators
Loops [for and while] ___
## Expressions and Operators Operators are used to perform specific mathematical and logical computations on operands. In other words, we can say that an operator operates the operands. In JavaScript operators are used for compare values, perform arithmetic operations etc. There are various operators supported by JavaScript.
Type of operates:
operater | function | ex.symbole |
---|---|---|
Assignment operators | assigns a value to its left operand based on the value of its right operand. | = += -= |
Logical operators | perators actually return the value of one of the specified operands, so if these operators are used with non-Boolean values, they may return a non-Boolean valu | != && |
Truth Table As logical expressions are evaluated left to right, they are tested for possible “short-circuit” evaluation using the following rules:
false && anything is short-circuit evaluated to false. true || anything is short-circuit evaluated to true.
A quick and easy way to do something repeatedly.
for loop form
Exampel:
while loop form Exampel: