Lesson 5 of 55 · javascript
Control Flow – if / switch / loops
Duration: 10 mins
Conditional statements (if, else if, else) and switch for multi‑branch logic.
Looping constructs:
for (init; condition; final)while (condition)do … while (condition)for…of– iterates over iterable objects.for…in– iterates over enumerable property names.
Example: Looping over an array with for…of
const colors = ['red','green','blue'];
for (const c of colors) {
console.log(c);
}