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.
This is a pretty good example, and a well written article, however, the
includes
on thesecond_keys
is going to cause it to start running very slowly if there are many properties, you'd be much better off usingObject.hasOwnProperty
rather than reinventing it with a linear array search.Very useful information, thank you. I've modified the article.