JAVASCRIPT / TURN DATA INTO SOMETHING USEFUL
See the data.
Understand the code.
Filter, map, sort and summarize. Run real JavaScript, inspect the result, and learn how to transform data without accidentally changing the original.
[4, -2, 7, 0] ↓ filter positive [4, 7] ↓ map × 2 [8, 14] ↓ reduce sum 22
Follow the shape at every step.
Custom runs use this input. Challenge checks use the fixed cases above. JSON is limited to 20,000 characters. Ctrl/⌘ + Enter runs custom input. Large result and log previews are abbreviated; downloaded run reports contain those same bounded previews.
MAKE EVERY STEP VISIBLE
Build a number pipeline.
Experiment with a JSON array of finite numbers. The result and exported JavaScript use these exact operations in this exact order.
WHY DID THE ORIGINAL CHANGE?
Be a copy detective.
Each experiment starts fresh with {user: {name: "Ada"}, active: false}. Change a value on the copy and inspect both objects.
Original
Copy
This nested copy is sufficient for this particular shape. It is not a universal deep-copy function for arbitrary values.
Turn practice into working habits.
A useful data-transform checklist
- Define the input and output shapes.
- Decide how empty or missing data should behave.
- Choose whether mutation is allowed.
- Test ordering, ties, zeros and negative numbers.
- Use a clear intermediate step when a chain gets hard to explain.
Passing these fixture checks does not prove correctness for every possible input. The lessons specify JSON-compatible datasets; they do not cover every JavaScript value or sparse-array behavior.
Your saved workspace
Drafts, input, notes, pipeline settings and passing checks save in this browser when storage is available. Editing code removes its pass. Results are session-only; download a run report to keep them.