ZeroOne English technical blog
JavaScript Array.fill Shares Objects: Create Independent Items
2026-10-22
Frontend
Fix shared objects created by JavaScript Array.fill. Test sparse map callbacks, nested template copies, and matrix rows with independent mutable cells.
1015 words
|
5 minutes
JavaScript Regex test() Alternates: Reset or Remove Stateful Flags
2026-10-21
Frontend
Trace why JavaScript regex test() alternates true and false, fix skipped filter results, and verify when resetting lastIndex preserves sticky behavior.
884 words
|
4 minutes
JavaScript Set Keeps Duplicate Objects: Deduplicate by ID
2026-10-20
Frontend
Deduplicate JavaScript objects by ID with tested first-wins and last-wins examples. Verify output order, mixed ID types, missing IDs, and shared references.
1060 words
|
5 minutes
JavaScript Object Spread Overwrites Nested Objects: Merge Each Level
2026-10-18
Frontend
Fix nested settings lost during JavaScript object spread. Reproduce overwrite order, preserve defaults, and test undefined, null, arrays, and shared references.
1255 words
|
6 minutes
JavaScript Date One Day Off: Keep Date-Only Values Intact
2026-10-17
Frontend
Reproduce JavaScript dates shifting a day in three time zones, then choose date-only storage, local midnight, or explicit UTC without offset hacks.
978 words
|
5 minutes
JavaScript Async filter Keeps Every Item: Await the Decisions
2026-10-16
Frontend
Fix async filter keeping every item with a tested value-decision pairing, reverse completion trace, and explicit rejection and mutation boundaries.
920 words
|
5 minutes
structuredClone DataCloneError: Separate Data from Functions
2026-10-15
Frontend
Fix structuredClone errors from functions, distinguish lost class methods from clone failures, and verify a data-only payload with runnable Node.js checks.
1014 words
|
5 minutes
JavaScript reduce on Empty Arrays: Choose the Initial Value
2026-10-14
Frontend
Fix reduce on empty arrays with a tested seed policy: compare omitted and undefined seeds, trace sparse callbacks, and avoid zero for negative maxima.
1023 words
|
5 minutes