Filter array items

Filter array items 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 remove inactive users from an array before sending notifications. Filter the users array…
I need to remove inactive users from an array before sending notifications. Filter the users array to include only those with isActive true and a lastSeen timestamp within the past 90 days. Return the filtered array ready for the notifications job.

Improve — make it easier to accept

+
Before the notifications run tonight, make the filter easy to audit. Put the final count comment…
Before the notifications run tonight, make the filter easy to audit. Put the final count comment above the snippet, show the filter condition clearly (isActive and lastSeen window), and flag edge cases like missing lastSeen or clock skew. Keep the code short and explicit so an operations reviewer can verify it quickly.

Decide — diagnose the stuck moment

+
I just filtered users but notifications still went to accounts marked inactive. The operations…

Notifications went to inactive accounts

I just filtered users but notifications still went to accounts marked inactive. The operations manager, Lee, is upset. I’m uncertain whether lastSeen was missing or the isActive flag is inconsistent in the DB. What’s the most likely reason and the immediate safe fix to prevent more unwanted notifications tonight?

Become — change the pattern

+
We keep having mismatched filter criteria between the API, the worker, and the analytics job, so…

Filter logic drifting between services

We keep having mismatched filter criteria between the API, the worker, and the analytics job, so reports and jobs disagree on who is active. It undermines trust and causes repeated firefights. Which single pattern will stop this — a shared utility function, schema-enforced user state, or documented business rule in a central place? Recommend the change and how to get the team to adopt it.

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.