Ctrl K
Frontend · Mid-level · Coding

Write a deepEqual function. It takes two values and returns true if they're deeply equal: primitives are compared as usual, and arrays and plain objects recursively by their contents.

~15 min by voice

How to approach it

They're checking how careful you are with edge cases: typeof null, NaN, an array versus an object, a missing key versus undefined, cycles. It also matters whether you can clarify the requirements and talk through the recursion plan before coding.

Have you seen this question in a real interview?
Answers0
Avg. score—
Strong—
Practiced0
Topics

Answer by voice

The interviewer will ask this question and listen. Think out loud and ask for a hint if you need one. When you're done, pause or tap “That's my answer”. In about a minute, your score and the points you covered show up here.

Sign in to answer

Best with headphones · ~15 min