Export a function

Export a function in JavaScript — with the four heights of help laid out: do it now, make it easier for the next person to accept, work out the right move when you are stuck, and learn the pattern so it stops coming back.

4prompt heights
Open it in the interactive atlas →

The four heights

The same task, four distances: today's deadline, the next reviewer, the stuck moment, the pattern.

Execute — do the immediate task

+
I need to hand off this utility to the rest of the frontend team. Export the function default so…
I need to hand off this utility to the rest of the frontend team. Export the function default so imports are simple, keep the function name sensible for stack traces, and ensure the file still exports any other helpers used by the app. Make the export last in the file and add a one-line comment above it explaining intended use.

Improve — make it easier to accept

+
Before I publish this module for the team, make the exported API obvious. Put the primary export at…
Before I publish this module for the team, make the exported API obvious. Put the primary export at the bottom, surface the exported function name in the file top comment, and list secondary helpers together with brief one-line comments so a reviewer can grasp what they must import.

Decide — diagnose the stuck moment

+
I wired an import in App.js to use calculateDiscount but the console shows cannot find module. I…

I just saved the file and the import in App still fails to find the function

I wired an import in App.js to use calculateDiscount but the console shows cannot find module. I exported function calculateDiscount at the top as a named export, but other files expect a default. I'm worried changing the import will break customers. Should I convert calculateDiscount to a default export, change every consumer to named import, or add both export styles? Which has the least risk and what are the exact edits?

Become — change the pattern

+
Over the last quarter we waste time swapping imports because contributors mix default and named…

We repeatedly ship modules where consumers are confused by default vs named exports

Over the last quarter we waste time swapping imports because contributors mix default and named exports across libraries. I want a habit that stops the churn: a short rule team members follow when adding exports, and a lightweight review checklist that flags mismatches. Suggest one team rule and two review checklist items that prevent this pain without blocking velocity.

Next to this one

Other programming language work people do in JavaScript.

Every task here came from the work, not from a feature list — which is why the prompts name what you want done and never the button that does it. The tool changes; the work does not.
Copyright © LLOS.ai · 2026 — original pedagogy, voice, and design — all rights reserved.

The rest of the map

Same library, five ways in.