Kai Nakamura AI tutor portrait for this course

Guided course - 5 chapters

JavaScript projects: A Practical Course with Kai Nakamura

Kai Nakamura teaches JavaScript projects through five practical chapters that move from a clear foundation to guided work, applied decisions, and revision. You will finish with a working program, configuration, or technical walkthrough, a tutor-ready capstone, saved notes, and a repeatable way to continue practicing.

Beginner to intermediate builders 2 hrs 30 min Practice and checkpoints Free curriculum
Start or resume

Your course progress

0 of 5 chapters complete

0%
0%

Sign in is required to save progress, checkpoint answers, and notes. Sign in to continue.

Next: chapter 1

What you will learn

Build knowledge, use it, and leave with evidence of progress.

  • Explain the essential JavaScript projects vocabulary through a connected mental model.
  • Follow and explain a reliable technical problem solving workflow in guided practice.
  • Apply JavaScript projects to a realistic scenario with visible constraints and tradeoffs.
  • Evaluate and revise a working program, configuration, or technical walkthrough using evidence-based success criteria.
  • Complete a capstone and leave with a specific next-practice plan.

Before you start

  • Comfort using a web browser and basic files
  • No previous programming experience is required unless a chapter says otherwise

Useful materials

  • A laptop or desktop computer
  • A text editor or browser-based coding environment
  • A notes file for test cases and debugging observations

Suggested rhythm

Complete one 30-minute chapter at a time: learn for 10 minutes, practice for 15, then use 5 minutes for the checkpoint and notes.

Course capstone

Working JavaScript projects mini project

Build a focused JavaScript projects solution for a clear user need and show how you tested the important behavior.

What you will submit

  1. A working project or documented configuration
  2. Three test cases with results
  3. A concise README explaining decisions and next improvements

How it will be reviewed

  • Core behavior works as intended
  • The solution is understandable
  • Tests cover likely failures
  • Technical choices are explained

Course chapters

Learn, practice, check, and record what matters.

2 hrs 30 min total
  1. Chapter 1

    JavaScript projects: Foundations and vocabulary

    Build a dependable mental model for JavaScript projects before trying to memorize isolated details. You will define the essential vocabulary, inspect a worked example, and turn the ideas into a reference you can actually use.

    27 min Not complete

    Learning objectives

    • Explain the purpose of JavaScript projects in your own words.
    • Use the chapter vocabulary accurately in a short example.
    • Distinguish a strong example from a common misconception.
    • Create a compact reference for later practice.

    Key terms

    1

    Start with the purpose

    Place JavaScript projects inside a small but realistic software or digital-safety task. Name the result a learner is trying to produce and the constraints that make the skill useful.

    2

    How JavaScript projects actually works

    These are the load-bearing ideas. Everything later in the course is an application of one of them, so it is worth reading slowly and returning to when something stops making sense.

    • Loose equality coerces types first. The == operator converts its operands before comparing, which is why 0 equals an empty string under it while NaN never equals itself. Default to the strict === and !== operators, and use == only for the deliberate null-or-undefined check.
    • Microtasks run before the next macrotask. Promise callbacks queue as microtasks, and the whole microtask queue drains after the current synchronous code finishes but before any timer callback runs. That is why a resolved promise callback fires ahead of a setTimeout with a delay of zero.
    • Numbers are IEEE 754 doubles. Every JavaScript number is 64-bit floating point, so 0.1 + 0.2 evaluates to 0.30000000000000004 and integers beyond about 9 quadrillion lose precision. Handle money in integer minor units such as cents, or use BigInt for large exact integers.
    3

    Misconceptions worth clearing early

    Each of these is common, understandable, and expensive to leave in place. Recognising them now saves rework later.

    • Expecting an async function to return its value directly. The body reads like ordinary sequential code, so the return looks ordinary too. Fix: An async function always returns a promise. Await the call, or chain a then handler onto it.
    • Losing the value of this when passing a method as a callback. The method reference is handed over without its receiver object attached. Fix: Wrap it in an arrow function or bind the method, since arrow functions take this from the enclosing scope.
    • Changing several things at once when something breaks. It feels faster than testing one change at a time. Fix: Change one thing, observe, and revert it if the behaviour does not move; keep the loop small.
    4

    Build the mental model

    Connect the key terms as a process rather than a word list. Use this sequence: decompose the problem, build one testable step, inspect the result, and debug deliberately.

    5

    Catch the common miss

    Compare a surface-level attempt with one that shows correct behavior, readable structure, useful tests, and an explained decision. Explain the single difference that matters most.

    CHAPTER 1 OF 5 · FOUNDATIONSJavaScript projectsLeaves you with a working program, configuration, or techni…COURSE PROGRESSinputlogicstateKEY TERMS
    Visual model

    JavaScript projects at a glance

    JavaScript projects at a glance Use this map to connect the purpose, vocabulary, example, and quality check before memorizing details. 1 Purpose 2 Key ideas 3 Example 4 Check

    Use this map to connect the purpose, vocabulary, example, and quality check before memorizing details.

    JavaScript foundations

    Filter an array and watch it respond

    JavaScript Drag any number, or edit the code - it reruns as you change it
    Live output ready

    This code is alive: drag any number left or right, or edit the code, and the result recomputes instantly.

    • Drag the 80 down to 60 and watch two more scores pass.
    • Change 64 to 84 in the list. Which line of output changes, and why?
    • Flip >= to < and predict the output before it runs.
    Side-by-side comparison

    Two programs that both "work"

    Both attempts look plausible from a distance. Toggle the highlights and study where they part ways.

    Aspect Fragile script Dependable program
    Behavior Right answer for the one input tried so far Right answer for normal, empty, and extreme inputs
    Readability Single-letter names; the intent lives in the author's head Names describe the data; the next reader needs no tour guide
    Failure Crashes or returns nonsense on an empty list Guards the edge case and proves it with a test

    The difference is invisible on the happy path and decisive everywhere else.

    Practice round

    Match the JavaScript projects vocabulary

    Tap a term, then the definition it belongs to. Wrong guesses cost nothing but honesty.

    Retrieval beats rereading: pulling a definition from memory strengthens it far more than recognizing it on the page.

    • Clear the board once, shuffle, and beat your attempt count.
    • Say each definition aloud before tapping — then check yourself.
    Practice activity - 12 min

    Make a one-page field guide

    Create a compact field guide that would help a new learner recognize and begin using JavaScript projects.

    1. Write a one-sentence definition and purpose.
    2. Add the four key terms with a plain-language example.
    3. Include one non-example and explain why it misses.
    4. Finish with a three-step starter checklist.
    Deliverable

    One annotated page or slide that can be reused in later chapters.

    Success looks like
    • The definition is specific.
    • Examples match the vocabulary.
    • The checklist is usable without extra explanation.
    Knowledge check

    Which response best shows a usable foundation in JavaScript projects?

    1 question
    Which response best shows a usable foundation in JavaScript projects?
    Not started

    Sign in to save chapter notes to your account.

    Ready to complete this chapter? Complete the field guide and answer the checkpoint before moving to guided practice.
  2. Chapter 2

    Game mechanics: Guided demonstration

    Follow a complete Game mechanics example from setup to result, pausing at the decisions that experts often make silently. Then repeat the process with support and check your work against visible criteria.

    29 min Not complete

    Learning objectives

    • Sequence the main steps in a reliable Game mechanics workflow.
    • Explain why each important decision is made.
    • Complete a supported example without skipping verification.
    • Use a checklist to identify one correction.

    Key terms

    1

    Watch the whole process

    Trace a model from the initial prompt to a working program, configuration, or technical walkthrough. Mark each point where the learner must observe, choose, or verify rather than act automatically.

    2

    Worked example: Predicting the output order of an event-loop snippet

    Follow each step and predict the next before you read it. Predicting first is what turns a demonstration into practice.

    1. A script logs A, then schedules a timer logging B with zero delay, then a resolved promise logging C, then logs D directly.
    2. The synchronous statements execute first in source order, printing A and then D.
    3. The call stack empties, so the microtask queue drains next and prints C.
    4. Only afterwards does the event loop pick up the timer macrotask and print B, giving the order A, D, C, B.

    A setTimeout of zero does not mean immediately; it means after the current task and after every pending microtask.

    3

    Where this usually goes wrong

    Watch for these while you work through the demonstration rather than afterwards.

    • Expecting an async function to return its value directly. The body reads like ordinary sequential code, so the return looks ordinary too. Fix: An async function always returns a promise. Await the call, or chain a then handler onto it.
    • Losing the value of this when passing a method as a callback. The method reference is handed over without its receiver object attached. Fix: Wrap it in an arrow function or bind the method, since arrow functions take this from the enclosing scope.
    • Changing several things at once when something breaks. It feels faster than testing one change at a time. Fix: Change one thing, observe, and revert it if the behaviour does not move; keep the loop small.
    4

    Practice with scaffolding

    Repeat the model with one detail changed. Keep the prompts visible and say or write the reason for each choice before continuing.

    5

    Check before feedback

    Use correct behavior, readable structure, useful tests, and an explained decision as the quality test. Make one self-correction before asking the tutor to review the result.

    CHAPTER 2 OF 5 · GUIDED DEMOGame mechanicsLeaves you with a working program, configuration, or techni…COURSE PROGRESSlogicstatetest caseKEY TERMS
    Guided flowchart

    A complete Game mechanics practice run

    Pause at each arrow and explain the decision before moving to the next step.

    Step 1 of 4: Read the task
    Live game mechanic

    Tune player movement by feel

    JavaScript Drag any number, or edit the code - it reruns as you change it
    Live output ready

    Game feel is tuning numbers while watching the result — exactly what this playground is for.

    • Drag speed up to 30. When does movement start feeling like teleporting?
    • Add three more update calls. Why does the square stop at 240?
    • Make one call use { left: true } and predict the final x.
    Practice round

    Rebuild the Game mechanics method

    The steps of this chapter's method, shuffled. Arrange them so they would actually work.

    A method is a sequence, not a bag of tips — if the order surprises you, that is exactly the gap worth closing now.

    • Order the steps, then explain to yourself why step 2 cannot go last.
    • Shuffle again and solve it in fewer moves.
    Practice activity - 15 min

    Complete the guided run

    Use the chapter workflow to produce a working program, configuration, or technical walkthrough for a slightly changed Game mechanics example.

    1. Restate the task and constraints.
    2. Follow the model one decision at a time.
    3. Record the reason for two key choices.
    4. Check the result and revise one issue.
    Deliverable

    A completed guided example with two decision notes and one correction.

    Success looks like
    • The workflow is complete.
    • Decisions have reasons.
    • The final check produces a visible correction.
    Knowledge check

    During guided Game mechanics practice, when is the best time to explain a choice?

    1 question
    During guided Game mechanics practice, when is the best time to explain a choice?
    Not started

    Sign in to save chapter notes to your account.

    Ready to complete this chapter? Submit the guided example with decision notes, one self-correction, and the checkpoint response.
  3. Chapter 3

    Creative coding: Applied scenario

    Transfer Creative coding into a realistic scenario where the prompt is less tidy and more than one option may be reasonable. You will define the constraints, choose an approach, and defend the tradeoff.

    32 min Not complete

    Learning objectives

    • Extract the relevant facts and constraints from a realistic scenario.
    • Generate at least two plausible approaches to Creative coding.
    • Choose an approach using explicit criteria.
    • Explain the likely consequence of the choice.

    Key terms

    1

    Read the situation

    Translate the scenario into a clear task. Separate facts, assumptions, constraints, and information that is interesting but not relevant to Creative coding.

    2

    Choosing well under real constraints

    Applied work is mostly judgement under limits: less time, less information, and more competing goals than a textbook example allows. These are the decision rules that hold up in practice.

    • Two approaches both look workable: Choose the one you can test more easily; testability compounds faster than elegance.
    • The task feels too large to start: Cut it until one piece can be finished and verified in under an hour, then build outward.
    • You are unsure whether something is a real bug: Write the smallest input that reproduces it; if you cannot reproduce it, you cannot claim to have fixed it.
    3

    Reading the situation before acting

    Before choosing an approach, state three things explicitly: what result the situation actually requires, which constraints are fixed rather than preferences, and what evidence would tell you the approach is working. Skipping this step is the most common reason competent work solves the wrong problem.

    • Loose equality coerces types first. The == operator converts its operands before comparing, which is why 0 equals an empty string under it while NaN never equals itself. Default to the strict === and !== operators, and use == only for the deliberate null-or-undefined check.
    4

    Practitioner notes

    Small pieces of working knowledge that rarely appear in introductory material.

    • Prefer const, fall back to let, and treat var as legacy. Block scoping alone eliminates an entire class of loop-closure bugs.
    • Use map, filter and reduce when transforming data, but keep a plain for loop when you need to break early or the transformation is genuinely imperative.
    5

    Compare real options

    Generate two workable approaches and test both against the purpose. Do not hide the tradeoff; name what each option improves and what it gives up.

    6

    Make the reasoning visible

    Produce a working program, configuration, or technical walkthrough and attach a short decision note. The note should make the result auditable, not merely confident.

    CHAPTER 3 OF 5 · APPLIED SCENARIOCreative codingLeaves you with a working program, configuration, or techni…COURSE PROGRESSstatetest casedebuggingKEY TERMS
    Visual model

    From scenario to decision

    From scenario to decision A realistic task becomes manageable when facts and constraints are separated before options are compared. 1 Facts 2 Constraints 3 Options 4 Decision

    A realistic task becomes manageable when facts and constraints are separated before options are compared.

    Live creative code

    Grow a pattern from two numbers

    JavaScript Drag any number, or edit the code - it reruns as you change it
    Live output ready

    Artists sketch by reacting to what appears. Scrub size and gap and let the pattern talk back.

    • Drag gap slowly from 26 to 15 — find the moment the pattern reads as a checkerboard.
    • Make size larger than gap. What happens, and is it a bug or a texture?
    • Swap the two color strings.
    Practice round

    Match the Creative coding vocabulary

    Tap a term, then the definition it belongs to. Wrong guesses cost nothing but honesty.

    Retrieval beats rereading: pulling a definition from memory strengthens it far more than recognizing it on the page.

    • Clear the board once, shuffle, and beat your attempt count.
    • Say each definition aloud before tapping — then check yourself.
    Practice activity - 18 min

    Solve the scenario

    Apply Creative coding to a scenario from school, work, home, or community life that includes at least two constraints.

    1. Write the task, audience, and constraints.
    2. Sketch two possible approaches.
    3. Choose using three criteria from the chapter.
    4. Produce the result and explain one tradeoff.
    Deliverable

    A scenario response with an option comparison and a short decision note.

    Success looks like
    • Constraints are visible.
    • Both options are plausible.
    • The final choice follows the stated criteria.
    Knowledge check

    What makes an applied Creative coding decision defensible?

    1 question
    What makes an applied Creative coding decision defensible?
    Not started

    Sign in to save chapter notes to your account.

    Ready to complete this chapter? Finish the scenario response, compare two options, and explain the selected tradeoff.
  4. Chapter 4

    UI prototypes: Review and improve

    Learn to diagnose and improve UI prototypes work with a focused rubric instead of vague judgment. You will separate symptoms from causes, revise the highest-value issue, and document the before-and-after difference.

    30 min Not complete

    Learning objectives

    • Evaluate a draft using explicit UI prototypes criteria.
    • Identify the cause behind the most important weakness.
    • Choose a revision with high impact and reasonable effort.
    • Explain how the revision changes the result.

    Key terms

    1

    Use the rubric, not a feeling

    Review the work for correct behavior, readable structure, useful tests, and an explained decision. Record evidence for each judgment so feedback points to something observable.

    2

    Diagnostic checklist

    Run this before you revise anything. Diagnosing first prevents the common failure of polishing the parts that were already fine.

    • Check: Expecting an async function to return its value directly — is this present in your work?
    • Check: Losing the value of this when passing a method as a callback — is this present in your work?
    • Check: Changing several things at once when something breaks — is this present in your work?
    • Check: Reading code without running it — is this present in your work?
    3

    The quality bar

    This is what finished work looks like in this field. Use it as the standard for your revision rather than a general sense of improvement.

    • The behaviour is correct on ordinary input and on at least one awkward edge case
    • Names describe intent, so the code can be read without the author present
    • There is a concrete way to demonstrate that it works, not just an assurance
    4

    Diagnose before editing

    Name the symptom, then ask what decision or missing step produced it. Choose the cause you can address rather than changing everything at once.

    5

    Revise and compare

    Make one purposeful revision and compare the two versions. Keep the change only if it improves the intended result without creating a larger problem.

    CHAPTER 4 OF 5 · REVIEW & IMPROVEUI prototypesLeaves you with a working program, configuration, or techni…COURSE PROGRESStest casedebugginginputKEY TERMS
    Revision flowchart

    Evidence-led improvement loop

    Revise the cause of the highest-value issue, then compare the new result with the original criteria.

    Step 1 of 4: Inspect evidence
    Live UI prototype

    Make an interface announce its state

    JavaScript Drag any number, or edit the code - it reruns as you change it
    Live output ready

    Click the button: the visible label and the accessible state change together, from one source of truth.

    • Click it twice and watch aria-pressed flip in the button.
    • Change the two label strings to describe a different setting.
    • What breaks if you update textContent but forget aria-pressed?
    Side-by-side comparison

    Two programs that both "work"

    Use this pair as your revision rubric: find which column your current draft sits in, one row at a time.

    Aspect Fragile script Dependable program
    Behavior Right answer for the one input tried so far Right answer for normal, empty, and extreme inputs
    Readability Single-letter names; the intent lives in the author's head Names describe the data; the next reader needs no tour guide
    Failure Crashes or returns nonsense on an empty list Guards the edge case and proves it with a test

    The difference is invisible on the happy path and decisive everywhere else.

    Practice round

    Rebuild the UI prototypes method

    The steps of this chapter's method, shuffled. Arrange them so they would actually work.

    A method is a sequence, not a bag of tips — if the order surprises you, that is exactly the gap worth closing now.

    • Order the steps, then explain to yourself why step 2 cannot go last.
    • Shuffle again and solve it in fewer moves.
    Practice activity - 16 min

    Run a focused revision cycle

    Review a previous UI prototypes artifact or the supplied flawed example, then improve the most consequential issue.

    1. Score the draft against three criteria.
    2. Quote or point to evidence for the weakest score.
    3. Name the likely cause and revise it.
    4. Write a before-and-after comparison.
    Deliverable

    A marked-up draft, revised version, and four-sentence change note.

    Success looks like
    • Feedback cites evidence.
    • The revision addresses a cause.
    • The comparison explains a measurable or observable improvement.
    Knowledge check

    Which feedback is most useful for improving UI prototypes?

    1 question
    Which feedback is most useful for improving UI prototypes?
    Not started

    Sign in to save chapter notes to your account.

    Ready to complete this chapter? Document one evidence-based diagnosis, revision, and before-and-after comparison.
  5. Chapter 5

    Portfolio polish: Capstone integration

    Integrate the course methods in a compact Portfolio polish capstone. You will define the brief, plan milestones, produce a complete result, gather tutor feedback, and leave with a repeatable next-practice plan.

    37 min Not complete

    Learning objectives

    • Translate the capstone brief into milestones and checks.
    • Combine the course methods without losing the central purpose.
    • Present evidence for the quality of the final result.
    • Choose the next skill to practice from the final review.

    Key terms

    1

    Define a finishable brief

    Choose a specific audience, result, and boundary for the Portfolio polish capstone. Reduce scope until the project can be finished and reviewed in one focused cycle.

    2

    Bringing the parts together

    A capstone is judged on coherence, not on the number of techniques it includes. Return to the core ideas and make sure the work demonstrates them rather than decorating them.

    • Loose equality coerces types first. The == operator converts its operands before comparing, which is why 0 equals an empty string under it while NaN never equals itself. Default to the strict === and !== operators, and use == only for the deliberate null-or-undefined check.
    • Microtasks run before the next macrotask. Promise callbacks queue as microtasks, and the whole microtask queue drains after the current synchronous code finishes but before any timer callback runs. That is why a resolved promise callback fires ahead of a setTimeout with a delay of zero.
    • Numbers are IEEE 754 doubles. Every JavaScript number is 64-bit floating point, so 0.1 + 0.2 evaluates to 0.30000000000000004 and integers beyond about 9 quadrillion lose precision. Handle money in integer minor units such as cents, or use BigInt for large exact integers.
    3

    Standards that make the work credible

    These are the marks of work that would be taken seriously by someone who does this professionally.

    • The behaviour is correct on ordinary input and on at least one awkward edge case
    • Names describe intent, so the code can be read without the author present
    • There is a concrete way to demonstrate that it works, not just an assurance
    4

    Practitioner notes

    Small pieces of working knowledge that rarely appear in introductory material.

    • Prefer const, fall back to let, and treat var as legacy. Block scoping alone eliminates an entire class of loop-closure bugs.
    • Use map, filter and reduce when transforming data, but keep a plain for loop when you need to break early or the transformation is genuinely imperative.
    5

    Build with checkpoints

    Plan foundation, first draft, verification, and revision milestones. At each checkpoint, save evidence instead of relying on memory.

    6

    Present and continue

    Present a working program, configuration, or technical walkthrough with a concise rationale. Use the final rubric to choose one strength to retain and one next practice target.

    CHAPTER 5 OF 5 · CAPSTONEPortfolio polishLeaves you with a working program, configuration, or techni…COURSE PROGRESSdebugginginputlogicKEY TERMS
    Visual model

    Capstone learning loop

    Capstone learning loop The capstone is a complete cycle: define a finishable brief, build, review evidence, then choose the next practice target. 1 Brief 2 Build 3 Review 4 Continue

    The capstone is a complete cycle: define a finishable brief, build, review evidence, then choose the next practice target.

    Practice round

    Match the Portfolio polish vocabulary

    Tap a term, then the definition it belongs to. Wrong guesses cost nothing but honesty.

    Retrieval beats rereading: pulling a definition from memory strengthens it far more than recognizing it on the page.

    • Clear the board once, shuffle, and beat your attempt count.
    • Say each definition aloud before tapping — then check yourself.
    Practice activity - 22 min

    Complete the capstone sprint

    Create a complete Portfolio polish artifact for a defined audience and purpose, using the course rubric to review it.

    1. Write a brief with scope and success criteria.
    2. Create the first complete version.
    3. Run a self-check and request focused tutor feedback.
    4. Revise, present, and set one next-practice target.
    Deliverable

    A finished capstone, evidence of one revision, and a next-practice note.

    Success looks like
    • The result answers the brief.
    • Course methods are visible.
    • Revision follows feedback or evidence.
    • The next step is specific and achievable.
    Knowledge check

    When is the Portfolio polish capstone ready to finish?

    1 question
    When is the Portfolio polish capstone ready to finish?
    Not started

    Sign in to save chapter notes to your account.

    Ready to complete this chapter? Submit the completed capstone, revision evidence, rubric review, and one concrete next-practice target.

Make it personal

Turn the public curriculum into your own learning path.

Ask Kai Nakamura to adapt the sequence to your level, available time, and goal. The personalized path can then be saved in your workspace.