When I do console.log(someobject), I see some __proto__ object things inside my object, which contain a huge amount of data in them.
If I have a lot properties on my objects (properties that are also objects), I can easily get hundreds of protos. Anyway does this affect performance in any way? Should I use arrays instead?
It’s just part of JavaScript’s internal prototype chain. Whenever a new object is created, its
__proto__property is set to its “parent” object’sprototypeproperty. To answer your question, it has no impact on performance that you can control directly, so don’t worry about it.If you want to read more about it, check out MDN, https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/Proto