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
Recursively compare two values. First check strict equality for primitives and same-reference objects. Then verify both are objects of the same type with the same number of keys. Finally, recursively compare each key's value in both objects.
Short-circuiting on strict equality handles primitives and shared references in O(1), while recursive key-by-key comparison catches structural differences at any depth.
Updated Mar 2026