Created
August 19, 2012 13:30
-
-
Save jaredwilli/3394806 to your computer and use it in GitHub Desktop.
Object.create support if not exists
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
| if (typeof Object.create !== "function") { | |
| Object.create = function(o) { | |
| function F() {} | |
| F.prototype = o; | |
| return new F(); | |
| }; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment