-
-
Save GabyL/df94cf2c3774d2e2e293 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| <html> | |
| <head> | |
| <style> | |
| body { background: #358; color: #fff; padding: 50px; font-family: sans-serif; } | |
| </style> | |
| </head> | |
| <body> | |
| <script> | |
| var methodyObject = function() { | |
| this.my_method = function() { | |
| console.log("YAY a method"); | |
| return this; | |
| } | |
| this.other_method = function() { | |
| console.log("omg YAY other"); | |
| } | |
| } | |
| var obj = new methodyObject(); | |
| var result = obj.my_method().other_method(); | |
| console.log(result); | |
| </script> | |
| </body> | |
| </html> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment