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.
Your course progress
0 of 5 chapters complete
0%Sign in is required to save progress, checkpoint answers, and notes. Sign in to continue.
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
- A working project or documented configuration
- Three test cases with results
- 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.
-
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.
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.
Visual modelJavaScript projects at a glance
Use this map to connect the purpose, vocabulary, example, and quality check before memorizing details.
JavaScript foundationsFilter an array and watch it respond
Live output readyThis 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 comparisonTwo 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 roundMatch 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 minMake a one-page field guide
Create a compact field guide that would help a new learner recognize and begin using JavaScript projects.
- Write a one-sentence definition and purpose.
- Add the four key terms with a plain-language example.
- Include one non-example and explain why it misses.
- Finish with a three-step starter checklist.
DeliverableOne 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 check1 questionWhich response best shows a usable foundation in JavaScript projects?
Not startedSign in to save chapter notes to your account.
-
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.
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.
- A script logs A, then schedules a timer logging B with zero delay, then a resolved promise logging C, then logs D directly.
- The synchronous statements execute first in source order, printing A and then D.
- The call stack empties, so the microtask queue drains next and prints C.
- 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.
Guided flowchartA complete Game mechanics practice run
flowchart LR N1["Read the task"] N2["Model one step"] N3["Try with support"] N4["Verify the result"] N1 --> N2 N2 --> N3 N3 --> N4Pause at each arrow and explain the decision before moving to the next step.
Live game mechanicTune player movement by feel
Live output readyGame 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 roundRebuild 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 minComplete the guided run
Use the chapter workflow to produce a working program, configuration, or technical walkthrough for a slightly changed Game mechanics example.
- Restate the task and constraints.
- Follow the model one decision at a time.
- Record the reason for two key choices.
- Check the result and revise one issue.
DeliverableA 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 check1 questionDuring guided Game mechanics practice, when is the best time to explain a choice?
Not startedSign in to save chapter notes to your account.
-
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.
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.
Visual modelFrom scenario to decision
A realistic task becomes manageable when facts and constraints are separated before options are compared.
Live creative codeGrow a pattern from two numbers
Live output readyArtists 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 roundMatch 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 minSolve the scenario
Apply Creative coding to a scenario from school, work, home, or community life that includes at least two constraints.
- Write the task, audience, and constraints.
- Sketch two possible approaches.
- Choose using three criteria from the chapter.
- Produce the result and explain one tradeoff.
DeliverableA 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 check1 questionWhat makes an applied Creative coding decision defensible?
Not startedSign in to save chapter notes to your account.
-
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.
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.
Revision flowchartEvidence-led improvement loop
flowchart LR N1["Inspect evidence"] N2["Find the likely cause"] N3["Revise one issue"] N4["Compare versions"] N1 --> N2 N2 --> N3 N3 --> N4Revise the cause of the highest-value issue, then compare the new result with the original criteria.
Live UI prototypeMake an interface announce its state
Live output readyClick 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 comparisonTwo 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 roundRebuild 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 minRun a focused revision cycle
Review a previous UI prototypes artifact or the supplied flawed example, then improve the most consequential issue.
- Score the draft against three criteria.
- Quote or point to evidence for the weakest score.
- Name the likely cause and revise it.
- Write a before-and-after comparison.
DeliverableA 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 check1 questionWhich feedback is most useful for improving UI prototypes?
Not startedSign in to save chapter notes to your account.
-
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.
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.
Visual modelCapstone learning loop
The capstone is a complete cycle: define a finishable brief, build, review evidence, then choose the next practice target.
Practice roundMatch 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 minComplete the capstone sprint
Create a complete Portfolio polish artifact for a defined audience and purpose, using the course rubric to review it.
- Write a brief with scope and success criteria.
- Create the first complete version.
- Run a self-check and request focused tutor feedback.
- Revise, present, and set one next-practice target.
DeliverableA 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 check1 questionWhen is the Portfolio polish capstone ready to finish?
Not startedSign in to save chapter notes to your account.