Get to know MDN better
The JavaScript exception "property name __proto__ appears more than once in object literal" occurs when an object literal contains multiple occurrences of the __proto__ field, which is used to set the prototype of this new object.
The __proto__ key, unlike other property keys, is a special syntax in an object literal. It is used to set the prototype of the object being created and is not allowed to appear more than once in an object literal. Note that this restriction only applies to the __proto__ prototype setter syntax: if it actually has the effect of creating a property called __proto__, then it can appear multiple times. See prototype setter for the exact syntax restrictions.
Worth noting that the __proto__ key in object literals is a special syntax and is not deprecated, unlike the Object.prototype.__proto__ accessor property.
This page was last modified on Jul 8, 2025 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.