Created
August 1, 2016 01:21
-
-
Save coltpini/1bb555d8ba626797deedde4729096ffd to your computer and use it in GitHub Desktop.
Stage 3 of interesting object pattern
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
let myObj = MyObj.init({option1:"billy"}); | |
//My obj is now an instance. | |
myObj.myFunction(); | |
// Hi there, billy!! | |
let myObj2 = MyObj.init({option1:"jimmy"}); | |
// another instance of MyObj. | |
myObj2.myFunction(); | |
// Hi there, jimmy!! | |
MyObj.myFunction('sam'); | |
// Hi there, sam!! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment