Skip to content

Instantly share code, notes, and snippets.

@vsemozhetbyt
Created April 16, 2017 07:36
Show Gist options
  • Save vsemozhetbyt/02a0263d97ab894b884b8c4ee1041502 to your computer and use it in GitHub Desktop.
Save vsemozhetbyt/02a0263d97ab894b884b8c4ee1041502 to your computer and use it in GitHub Desktop.
const Word = 'Word'; // In the beginning was the Word,
const God = {
get [Word]() { // and the Word was with God,
return this; // and the Word was God.
},
};
console.log(God.Word === God); // The same was in the beginning with God.
// eslint-disable-next-line
Object.prototype.God = God.Word; // All things were made by him;
console.log({}.God === God.Word); // and without him was not any thing made
Object.setPrototypeOf(God, null); // that was made
console.log(God.God === undefined); // .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment