MODULE 02 · BEGINNER

Strings, Numbers & DecisionsJavaScript Mastery · Module 2

Work with text and numbers confidently, then use comparisons, conditions, and loops to make programs respond to real data.

6 lessons24 min readingBuild a real JavaScript foundation1 project
Free, self-paced, and open to everyone. No account needed.
WHAT THIS MODULE COVERS

Strings, Numbers & Decisions

Work with text and numbers confidently, then use comparisons, conditions, and loops to make programs respond to real data.

BEFORE YOU START

Variables, values, and the basic run/debug loop from Getting Started.

WHAT YOU’LL BE ABLE TO DO

Transform text, calculate with numbers safely, evaluate comparisons, write clear conditionals, and repeat work with loops that always terminate.

THE LESSON SEQUENCE

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.

  1. 02.01
    Strings & Template Literals

    Treat text as an immutable sequence, transform it with string methods, and build readable messages with template literals.

    4 min
  2. 02.02
    Numbers, Math & Precision

    Use JavaScript's single number type, round and format results deliberately, and detect invalid numeric input.

    4 min
  3. 02.03
    Booleans, Comparisons & Truthiness

    Compare values safely, predict which values count as true, and use logical operators without hidden conversions.

    4 min
  4. 02.04
    Conditionals & Guard Clauses

    Choose between branches with if, else if, and switch, then keep calculations safe with early exits and validation.

    4 min
  5. 02.05
    Loops & Iteration

    Repeat work with for, while, and do...while loops, control each pass, and iterate text and arrays safely.

    4 min
  6. 02.06
    Project: Password Strength CheckerProject

    Build a guided password checker that scores length and character variety, rejects obvious patterns, and explains its verdict.

    4 min
MODULE SELF-CHECK

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