instantiated any Date objects yourself, is there a way to get it back? I can't think of a way. If you did the same thing for Arrays, there's always [].constructor.
Like completing such a function as restoreDate shown below. delete Date; Date = restoreDate();
why would you delete it in the first place?
there's no native syntax for dates, so I doubt it's possible
This must be interesting https://hackernoon.com/javascript-cracking-nuts-override-object-constructor-48a73628b7e6
Maybe this? I'm not sure var oldDateProto = Date.prototype; Date = function() {...}; Date.prototype = oldDateProto;
Обсуждают сегодня