The Life Starter
0 of 6 complete0%
Course Library · Lesson 4 of 6
Create · Guided lesson

Track one story fact consistently

About 35 minutes · 7 reading + 28 practice and checks
Time includes reading, practice, and questions. Extra videos or further study are optional.
See this course’s project requirements

An original local browser story with six passages, three endings, meaningful choice consequences, reachable-state tests and a complete text reading alternative.

Keep your working files in your own notebook or software. Save a private description, checklist, and work link in My Proof.

What to include

  • Write six complete passages and three reachable endings.
  • Give choices different narrative consequences with stable targets.
  • Trace hasMap and history consistently and reset all state.
  • Run or honestly scope four path/invalid choice/restart checks.
  • Deliver working relative assets and all-route text companion.

Review and revise

Use these criteria to check your work and choose what to improve.

  • Narrative: choices affect later text/outcomes.
  • Continuity: incoming facts and item effects are coherent.
  • Engine: stable target/restart/path checks are correct.
  • Access/evidence: reading alternative and actual test scope are clear.
Open the full course project
Want more background?
Before you begin

The idea in everyday life

The engine carries passage, hasMap and history. A new state copies the history and appends the target. Some choices explicitly set hasMap; others retain it. Restart should reset all three fields. An ending guard catches a map-dependent outcome reached without the required item.

The idea

A fact changes only when a choice explicitly changes it.

Follow along

Track one story fact consistently — worked practice

A fact changes only when a choice explicitly changes it.

Original trace: fresh=start, false,[start]; choice 0→archive, true,[start, archive]; archive choice 0→ending_open, true,[start, archive, ending_open]. Alternate archive choice 1 explicitly sets false and goes ending_closed. A faulty restart that only changes passage retains old map/history and does not restore the stated initial state.

  1. 1. 4.1 Track

    Trace both the keep-map and leave-map routes on paper with all three state fields.

    You should see: All fields are traced.

  2. 2. 4.2 Track

    Read the engine’s explicit-effect check: use option.hasMap when present, otherwise retain state.hasMap. Do not treat false as “missing”.

    You should see: An explicit false effect is retained.

  3. 3. 4.3 Track

    Run the state tests or step through the provided trace. Check earlier history arrays are not reused and mutated by the new state.

    You should see: New history appends without overwriting prior state.

  4. 4. 4.4 Track

    Restart after an ending and verify passage=start, hasMap=false, history=[start]. Change a copied effect and update the expected state before testing.

    You should see: Restart resets all fields.

Now change one thing

New state has hasMap=false. The chosen option supplies no hasMap property. Under the property-presence rule, what Boolean value should the next state retain?

Your work

What to finish

A state trace table and restart check.

Common mistake

Watch for this

Using a truthiness default that discards an explicit false item change.

How can I tell I understand it?

You can explain exactly which choice creates, retains or removes an item.

Try 3 questions

Quick knowledge check

Answer all 3 questions. Get at least 2 right and the lesson completes automatically.

Not yet passed

You’ll get an explanation for each answer. Signed in? Your results save to your account.

1Why use property-presence checking for hasMap?
2Which restart state matches the contract?
3Why append to a new history array?
0 of 3 answeredApply the lesson to a short question, then review the explanation.
4
Finish this lesson

Pass the check. We’ll save the progress.

Answer all 3 questions above and get at least 2 right. You can review the explanations and try again.

Go to the knowledge check
Tools, templates, and lesson sources

Tools and templates

Tools open in a new tab so you can keep your place here.

Sources and further reading

Explore the references behind this lesson.

MDN: Working with Objects
Source & access notes · checked 2026-10-01

Read own object keys, case-sensitive property access and object literal semantics; original story data/code supplied.

Access: Public page text or PDF was opened and read through the web reader on 2026-10-01; no signup required for reading.

Reuse: Linked for further study. All LifeStarter scenarios, samples, assets and assessments are original; no source exercises or artwork are copied.

Report a problem with this lesson

Tell us what went wrong. Please leave out personal information and private project contents.

No sign-in needed.