Created
July 21, 2015 01:43
-
-
Save tinybike/2cb7451430d9ef82e7d3 to your computer and use it in GitHub Desktop.
JS dependency injection example
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
| var ragefest = { | |
| inquiry: "you mad, bro?" | |
| }; | |
| var Syringe = function (drugs) { | |
| return { | |
| superHappy: function () { | |
| console.log(drugs.inquiry); | |
| } | |
| } | |
| }; | |
| new Syringe(ragefest).superHappy(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment