Skip to content
WANCODE
BM

Checks and hints

How "Check answer" tests what your code actually does, how hints are designed, and why looking at the solution is fine.

Checks in WANCode don't compare your text with an answer key. They test the real page your code produces — what's in the DOM, how it's styled, and what happens when someone clicks or types. If your solution works but looks different from ours, it should still pass.

What happens when you press Check answer

  1. The preview reloads from scratch, so leftovers from earlier runs don't affect the result.
  2. The checks run one by one inside the sandbox, in your browser. Nothing is sent anywhere.
  3. You get a checklist: each item passes, or explains specifically what's still missing.
  4. When every check of an exercise passes, it's recorded in your local progress.

Kinds of checks

  • Structure — does the element exist, how many are there, does it have the right attribute (for example alt on images)?
  • Style — the browser's computed style, so color: blue, #2563eb and rgb(37 99 235) can all count as "blue".
  • Behaviour — small scripts that click buttons, type into inputs, call your functions and inspect the result or the console.
  • Source — rarely, a pattern in your code, used only when behaviour can't show the idea (for example "use const").

Behaviour checks have a short time limit each. If your code freezes the preview, the checks time out and tell you so — look for an infinite loop or very heavy work.

Hints

Each exercise has three hints, revealed one at a time: 1) a nudge about the concept, 2) a pointer to the exact place or property, 3) a near-complete answer. Try to stop at the first hint that unblocks you — that's where the learning happens.

Showing the solution

Stuck for a long time? Look at the solution. That's fine — reading working code is a real skill. After you confirm, it replaces your draft in the editor; you can switch back to your code or reset to the starter files. WANCode notes in your local progress that you viewed it. It doesn't block completion and nobody else can see it.

Best way to use a solution: read it, close it, then rebuild the exercise yourself from memory and press Check answer.

Self-checks for open-ended work

Some tasks can't be judged by a script — "write a clear prompt", "choose a colour palette you like", or a project's final polish. These come with a short self-check rubric. Tick each item honestly when it's true. It's self-assessment: it only counts for you, so it only helps if you're truthful.