How to implement window.Date.now ()?

is directly understood to mean that a property called Date is registered in window during initialization and assigns the function object instance (constructor) pointed to by the constructor attribute in the Date prototype object.
do not know whether it is correct?

window.Date=Date.prototype.constructor;

call

Date.now() //1540818420088
< H2 > add < / H2 >

just verified

Date.myNow=function(){console.log("myNow")}
window.Date.myNow() // myNow

clipboard.png

Sep.27,2021

// Date 
window.Date = function(){};
// Date 
window.Date.prototype.getTime = function(){ /* ... */ };
// Date 
window.Date.now = function(){ return (new Date()).getTime() }

I understand that it should be
window= {

Date: function Date(){
    ...
}

}

Menu