Last active
April 15, 2018 13:59
-
-
Save shobhitchittora/44b18af5a9d89bf19c310f46ddfa7593 to your computer and use it in GitHub Desktop.
JS Design Patterns - MODULE - Object Literal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const myModule = { | |
propertyA: "some value", | |
propertyB: function(){ | |
console.log(this.propertyA); | |
} | |
}; | |
console.log(myModule.propertyB()); // "some value" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment