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;
Tag: equality
Checking if two Dates have the same date info
How can I check if two different date objects have the same date information(having same day, month, year …)? I have tried “==”, “===” and .equals but none seems to work. Answer You can use valueOf() or getTime():