Skip to content
loading...

re: Handling Array Duplicates Can Be Tricky VIEW POST

TOP OF THREAD FULL DISCUSSION
re: I find this quite difficult to read with the reuse of names like resultItem and the double-negation of things like !notFound. I think the first exa...
 

Yes, I see your point about the double negation, I admit it should be done the other way around to improve readability, especially due to the reason that this post was written to show what is going on under the hood while finding duplicates.

About the recursion, the assumption for the given example was that we have only one level. As you said, a deep comparison is a thing of its own which wasn't the focus here.

If you are interested, take a look at the same post on devinduct.com and see Scott Sauyet comment. It's a quite interesting way to do the same thing.

code of conduct - report abuse