Maximum object children on node js [duplicate]
问题 This question already has answers here : Are there limits to the number of properties in a JavaScript object? (6 answers) Closed 8 days ago . I'm aware that the ECMA script spec says that an object can have infinite children however I also understand many ECMA script implementations do not conform to this. I was wondering if node has a limit on the amount of children an object can have? Thanks, Ed. 回答1: Yes it can but until heap out of memory. var a = {}; var i = 0; while(true){ a[i] = null;