#Read: 05 - Operators and Loops
Duckett: JavaScript & jQuery:
(1) Comparison and logical operators: 150-151, 156, and 157
(Is equal to ==) -> compares to values.
(Strict equal to ===) -> compares to values with data type.
(Is not equal to != )
(Strict not equal to)
other Comparison operators> < >= <=
Logical Operators -> && || !
(2)
for and while loops: 170 - 173, and 176
- The loop will continue to run for as long the condition is true
Three common types of loops:
1)For -> Syntax:
for (Initialization; Condition; Update) {
// code block to be executed
}
2)While -> Syntax:
while (condition) {
// code block to be executed
}
3)Do while