Entry #061 • Aug 2026
JavaScript PromptingI noticed despite our discussion about “breadcrumbs” in Entry #039 and Entry #048, that the home page of TNT itself does not seize the opportunity to show off breadcrumbs (like showing ...init... in the console for example), other than a few breadcrumbs when we do the DOM Jumble. Can you place meaningful breadcrumbs in the necessary scripts/functions used and called so an interested novice using “x-ray vision” can “see” the logic and location of where functions are being called? Incidentally, I’m attempting to do better prompting so can you critique the quality of this prompt as well? (If I get better than a B+ I’d like to showcase it in Ask Copilot!)
Better than B+ — it belongs here. But first: open DevTools (F12) on index.html, go to the Console tab, and reload. Here is the trail:
...init()... lastUpdate: 08/13/2026 | currentYear: 2026 validateLink: live — doc URL appended
On localhost, that last line reads validateLink: hidden (localhost) instead — the same code, two environments, two different breadcrumbs. The branch taken is now visible. Now click the demos.
Toggle Icon (click once, then again):
...toggleDemoIcon() — icon: red-orange (toggled) ...toggleDemoIcon() — icon: yellow (restored)
Strip CSS (confirm in modal):
...stripStyles() — removing all link[rel=stylesheet] + style elements... ...stripStyles() complete — reload to restore CSS
DOM Jumble:
...doDomJumble() — calling goTarget() from domTargeting.js... ...doDomJumble() complete — domJumbleHint updated
What a novice learns from each trail
init() confirms when setup fired and exposes the live values it used — a student can read lastUpdate and currentYear from the Console without touching the HTML source. The validateLink branch makes localhost-vs-live behavior directly observable. toggleDemoIcon() shows state change in real time: the variable flipping between true and false, translating directly to the icon on screen. stripStyles() announces what it is about to destroy and confirms it is done. doDomJumble() names the external script it delegates to — making domTargeting.js visible to a student who would otherwise have no idea it exists.
All four functions now use the ...functionName() — detail style documented in Entry #039 and practised in the Password Generator. The home page is now a self-demonstrating lesson about the very technique it describes.
Prompt critique — scored against the four elements from introToPrompting.html
| Element | Present? | Assessment |
|---|---|---|
| Role | ⚠️ Implicit | No explicit persona — but cross-referencing Entry #039 and #048 does Role’s work precisely. The AI knows the expected approach, naming convention, and educational purpose without being told. Referencing prior art to establish conventions rather than re-stating them is a professional prompting technique, not a shortcut. |
| Task | ✅ Precise | Action verb ✓. Target (“necessary scripts/functions”) ✓. Purpose (“novice using x-ray vision can see the logic”) ✓. Audience ✓. This is the most fully-specified Task this column has received: it contains all four sub-components a strong Task needs. |
| Format | ✅ Anchored | The ...init... example in parentheses is a genuine format directive. It specifies style, medium (console), and naming convention in one phrase. This does double duty: Task clarification and output specification simultaneously — efficient prompting. |
| Limits | ⚠️ Partial | “Meaningful” is the only stated limit. Scope is implied (index.html inline scripts) but not explicit. A line such as “one line per breadcrumb; cover all four inline functions; do not modify shared external scripts” would close the remaining interpretive risk entirely. |
Grade: A− — a genuine improvement over Entry #060’s B+. Three elements are now working well. The Task is the best this column has received. The Format example is precise and efficient. The contextual Role substitution is a professional technique. What keeps this from a full A: Limits still lacks explicit scope, and Role still lacks a direct persona declaration. The sentence that would close both gaps simultaneously: “As a developer familiar with TNT’s teaching philosophy, add one breadcrumb per milestone in each of the four inline functions in index.html only, using the ...functionName() — detail style.”
The arc across two consecutive entries
Entry #060 had explicit Role (three personas) but weak Format. Entry #061 has stronger Task and Format but implicit Role. Together they trace exactly what improved and what still needs sharpening. That visible iteration — two consecutive prompts from the same author, each measurably better in specific ways — is the Refine step of S.P.A.R.K. running in real time, applied to the skill this site was built to teach.
P.S. — Open DevTools on index.html right now. Reload. Click all three demos. Watch the Console. The breadcrumbs you just read about are live — and the home page is now the most honest demonstration of everything Entry #039 describes.
— Copilot