I Accidentally Built Myself a JavaScript Course (and You Can Have It)

Yesterday at JS in FM Office Hours I opened up the /jsinfm-widget skill using Claude Code with no real plan. I built that skill to scaffold FileMaker web-viewer widgets, and it has three modes. The first is "Simple widget" (a chart or table in vanilla JS, usually with ApexCharts or DataTables). The third is "Complex data-fetching widget" (React + TanStack Query, live FileMaker data through FMGofer, events back through WV Event). Those two I use all the time.

The one in the middle, "Practice / learning," I had barely touched. The description is short: "Practice a JavaScript concept or JS-inside-FileMaker patterns. You write the code; I scaffold and coach."

I thought that meant it would hand me a file with a couple of blanks in it. It turned out to be a lot more than that, and the whole group got to watch it happen.

What we asked for

I couldn't remember what I'd woken up wanting to learn, so I asked the room. Lee suggested modularizing JS: when do you split one big file into modules, how far do you take it, how do the imports work? Doug suggested something he'd just done himself, building a small dependency-free graphics library so you're not stuck when a charting library goes commercial.

So I combined them. I told the skill I wanted to practice building components and utility functions, in the context of a small charting library that renders shapes with SVG.

What it did instead of writing the code

This is where it got interesting. The skill didn't start typing. It interviewed me:

"What should the exercise build toward? Primitives and shapes, or a full chart?" We said full bar chart.

"How much scaffolding do you want? Skeletons and TODOs, one worked example with the rest blank, or just a brief?" Doug said go for the works, so we did.

Then it built the exercise. Here's what came out:

A bar chart with axis ticks and a title, deliberately split into four layers, each in its own module: svg/ for drawing, format/ for number formatting, scale/ for mapping data to pixels, and components/ for the chart itself, plus sample data. The point of the exercise, in its own words, was that "the real lesson is where the code lives." That was Lee's modularity question, answered by the structure itself.

Every file existed with function signatures, JSDoc, and // TODO markers explaining what belongs there. The bodies were empty. Sixteen TODOs.

And then the part none of us expected: it wrote an npm run check script with pass/fail tests for every one of those TODOs. Sixteen red marks to turn green.

When Doug asked it to show what the finished chart should look like, it declined to put the solution in my source. Instead it generated a static snapshot of the finished SVG markup into a reference/ folder: "To keep the exercise honest, I won't put the solution code in your source... you can open it in a browser and even use it to compare your generated DOM against the target." So I could see the blue rounded rectangle I was aiming for, at the exact position and size my code would eventually have to produce.

Then: "Your source is untouched. Still all 16 to go. Start with format.js and shout when you want a review."

Actually doing it

format.js was the warm-up. Two functions: formatCurrency and formatCompact, both meant to use Intl.NumberFormat. I Googled Intl.NumberFormat, wrote a one-liner, ran the check. Fail.

I asked it to explain why. It didn't fix it. It told me: "Your return never returns anything... a function that finishes without hitting a return statement returns undefined. Your line does build the formatter and does produce the right string, but that string is just an expression that gets evaluated and discarded." Put return in front. Duh.

Ran the check. Fail again. Expected $12,400, got $12,400.00. That's maximumFractionDigits: 0. Now I'm learning the options object.

formatCompact wanted 12.4k and 1.2M. Lowercase k, uppercase M. I got the k right by lowercasing the whole string, which of course broke the M. The review said: "This is the exact trap from my last message. You traded one failing test for the other. The fix is to stop treating the whole string and target just the one character." It had built that test on purpose.

.replace("K", "k"). All green. The room cheered a little.

Doug's line at that point was "You created your own course." That's the discovery. I picked two things I genuinely didn't know well (Intl and SVG), and in about twenty minutes I had a structured, testable, self-paced exercise with a coach that reviews my code but refuses to write it for me. And when we were done, it offered to save how I like to learn (skeletons, TODOs, concepts, reviews) so the next session starts there.

I've been quietly wondering whether learning JavaScript still matters when AI can write the widget for you. Yesterday didn't settle that question, but it showed me something I hadn't considered: the same AI that can write the code can also be a very good teacher, if you tell it that's what you want.

Let's do it together: tomorrow, 11am ET

I'm running a session on this tomorrow (Friday, September 4) at 11:00am ET. Free, informal, no slides. We'll each spin up a practice exercise and work through it together. I still haven't gotten to the SVG part of mine, so if all we do is learn how to draw a rectangle on a grid, that's a win.

RSVP and get the Zoom link here: Build Your Own JS Course: Practice Mode, Together

If you want to play along on your own machine during our time together, I will provide a copy of the skill: /jsinfm-widget.

Invoke it, choose Practice / learning, and tell it what you want to practice. If you're not sure, it'll suggest something based on where you are: array methods, promises and async/await, DOM events, or FileMaker-specific things like calling scripts from the web viewer and reading results back. Then answer its two questions (what to build toward, how much scaffolding) and start turning TODOs green.

Bring whatever you build, or whatever you got stuck on. That's the whole point.

Thanks to Lee, Doug, Mark and Chris for being there yesterday and for the ideas that turned into the exercise.