Engaged Employer
Q: Write poly-fill for Object.create?
Anonymous
if(typeof Object.create !== "function"){ Object.create = function(proto, properties){ if( (proto === null || typeof proto === "object" || typeof proto === "function")){ throw TypeError("Proto must be Object."); } var tmp = new Object(); tmp.__proto__ = proto; Object.defineProperty(tmp, properties); return tmp ; }; }
Check out your Company Bowl for anonymous work chats.