Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions files/en-us/web/javascript/guide/grammar_and_types/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,16 @@ Object literals support a range of shorthand syntaxes that include setting the p
Together, these also bring object literals and class declarations closer together, and allow object-based design to benefit from some of the same conveniences.

```js
// If `theProtoObj` and `handler` are not declared,
// the code will throw a ReferenceError:
// "theProtoObj is not defined" or "handler is not defined"

const theProtoObj = {
/*The proto Object*/
};
const handler = {
/*Handler*/
}
const obj = {
// __proto__
__proto__: theProtoObj,
Expand Down
Loading