Created
January 28, 2014 06:14
-
-
Save apburnes/8663012 to your computer and use it in GitHub Desktop.
Gist from mistakes.io
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 L = {}; | |
| L.fn = function() { return 'coolio' }; | |
| L.Util = { | |
| extend: function(desc) { | |
| var args = [].slice.call(arguments, 0); | |
| args.map(function(item, ix, arr) { | |
| desc[item] = args[ix]; | |
| }); | |
| return desc; | |
| } | |
| } | |
| var coolio = L.Util.extend({ | |
| cool: function() { | |
| return 'cool'; | |
| }, | |
| age: function(yr) { | |
| return 2014 - yr; | |
| } | |
| }) | |
| L.fn() | |
| coolio.cool(); | |
| coolio.age(1985); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment