DEV Community

Discussion on: Deeply Compare 2 Objects with Recursive Function in JavaScript

Collapse
 
miketalbot profile image
Mike Talbot ⭐ • Edited

This is a pretty good example, and a well written article, however, the includes on the second_keys is going to cause it to start running very slowly if there are many properties, you'd be much better off using Object.hasOwnProperty rather than reinventing it with a linear array search.

Collapse
 
rasaf_ibrahim profile image
Rasaf Ibrahim

Very useful information, thank you. I've modified the article.