Code
Loading editor...
Tap Analyze to see visualization
Click Analyze to visualize
See step-by-step execution, variables, and output
Variables
Run code to see variables
Output
Console output will appear here
Click Analyze to visualize
See step-by-step execution, variables, and output
Run code to see variables
Console output will appear here
Iterate over each source object's keys. When both target and source values are plain objects, recursively merge them. When both are arrays, concatenate them. Otherwise, the source value overwrites the target. Process multiple sources left to right.
Recursing into nested plain objects preserves deeply nested values from both sides, while array concatenation and scalar overwriting handle the other cases predictably.
Updated Mar 2026