Skip to content
Advertisement

Tag: equality

Javascript – deepEqual Comparison

Question (From Eloquent Javascript 2nd Edition, Chapter 4, Exercise 4): Write a function, deepEqual, that takes two values and returns true only if they are the same value or are objects with the same properties whose values are also equal when compared with a recursive call to deepEqual. Test Cases: My code: I think I have the general idea down;

Advertisement