JavaScript Control Flow

About

This module provides a comprehensive introduction to JavaScript control flow for beginner to intermediate learners. It covers essential topics like control flow concepts (sequence, branching, and looping), Boolean logic, and if...else statements. Advanced lessons include single-line if statements, nested branching, ternary and switch statements, while and do...while loops, and understanding truthy, falsy, and logical operators.

Content

Lesson Skills
Setup Setting up the development environment
Concepts Control flow in programming: sequence, branching & looping
Boolean Logic Use comparison operators to evaluate operands
Branching Branching logic with if...else statements
Looping Looping with classic for loop statements
Truthy and Falsy Truthy and falsy values in JavaScript

Level up content

Lesson Skills
Single Line if Effectively use single-line if statements
Nested Statements Nested if statements in JavaScript
Ternary Operator Syntax and structure of the ternary operator
switch Statement Syntax and structure of the switch statement
while Composing while loops
do...while Syntax and structure of the do...while loop
Loose Equality Illustrating type coercion with ==
Truthy, Falsy, and Logical Operators Using logical operators for conditional logic and default value assignments

References

📖 Reference Materials