Skip to main content

Practice ยท 2 of 3

Messy Data Normalizer

Write normalizeUsers(raw) โ€” raw is an array of anything. Keep only entries that are objects with string name and a numeric age (Number(value) finite). RETURN normalized objects { name: trimmedName, age: number }, dropping invalid entries silently.

Difficulty: intermediate

Back to lesson: Practice: Shapes & Inference โ€” Practice