Implement a function deepEqual
that performs a deep comparison between two values. It returns true
if two input values are deemed equal, and returns false
if not.
null
, objects, arrays).deepEqual('foo', 'foo'); // truedeepEqual({ id: 1 }, { id: 1 }); // truedeepEqual([1, 2, 3], [1, 2, 3]); // truedeepEqual([{ id: '1' }], [{ id: '2' }]); // false
Implement a function deepEqual
that performs a deep comparison between two values. It returns true
if two input values are deemed equal, and returns false
if not.
null
, objects, arrays).deepEqual('foo', 'foo'); // truedeepEqual({ id: 1 }, { id: 1 }); // truedeepEqual([1, 2, 3], [1, 2, 3]); // truedeepEqual([{ id: '1' }], [{ id: '2' }]); // false
console.log()
aparecerão aqui.