Strings, Numbers & Decisions
Work with text and numbers confidently, then use comparisons, conditions, and loops to make programs respond to real data.
Variables, values, and the basic run/debug loop from Getting Started.
Transform text, calculate with numbers safely, evaluate comparisons, write clear conditionals, and repeat work with loops that always terminate.
Read in order, or jump to what you need.
Every lesson builds on the one before it. Open any lesson to read the explanation, run the examples, and try the practice challenges.
- 02.01Strings & Template Literals4 min
Treat text as an immutable sequence, transform it with string methods, and build readable messages with template literals.
- 02.02Numbers, Math & Precision4 min
Use JavaScript's single number type, round and format results deliberately, and detect invalid numeric input.
- 02.03Booleans, Comparisons & Truthiness4 min
Compare values safely, predict which values count as true, and use logical operators without hidden conversions.
- 02.04Conditionals & Guard Clauses4 min
Choose between branches with if, else if, and switch, then keep calculations safe with early exits and validation.
- 02.05Loops & Iteration4 min
Repeat work with for, while, and do...while loops, control each pass, and iterate text and arrays safely.
- 02.06Project: Password Strength CheckerProject4 min
Build a guided password checker that scores length and character variety, rejects obvious patterns, and explains its verdict.
Ready to move on?
Build a password strength checker that explains its score and correctly handles empty, short, and mixed-character passwords.
Open the module self-check