Programmed Canon Canola calculators in 1977. Assorted platforms and languages ever since. Assisting with HOPL.info.
I am NOT looking for work -- I've got more than enough to do.
Location
Perth, WA Australia
Education
A few diplomas.
Work
Software Engineer at [Daisy Digital](https://daisydigital.com.au/)
Well said! This is the danger in things that "appear" to work, but have subtle bugs.
For me just borrow someone else's deep compare (which will be faster as the moment it finds a difference it will exit). Lodash/Underscore has a deep compare, Sugar has one too.
The shortest naive way to do this is JSON.stringify both operands. But let's imagine that the two arrays are 50Mb long and differ on the first character - that would be an awfully slow process and a lot of memory thrashing.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Your example works because {c:1,d:2} etc gets turned in to "[object Object]".
Well said! This is the danger in things that "appear" to work, but have subtle bugs.
For me just borrow someone else's deep compare (which will be faster as the moment it finds a difference it will exit). Lodash/Underscore has a deep compare, Sugar has one too.
The shortest naive way to do this is JSON.stringify both operands. But let's imagine that the two arrays are 50Mb long and differ on the first character - that would be an awfully slow process and a lot of memory thrashing.