The Object.is() static method determines whether two values are the same values or not in JavaScript.
Same values in JavaScript can mean different things based on how they are compared. You can read about equality comparisons and sameness from this MDN reference.
We are to implement a deepEqual function which recursively checks if two values are same or not, i.e hold the same value. It can take any JSON-serializable values.
In the above implementation , I have used a utility called isPojo(), which essentially checks if the given value is a Plain Old JavaScript Object or not. It can be implemented as follows: