📜  每秒刷新日期和时间角度 - Javascript代码示例

📅  最后修改于: 2022-03-11 15:04:33.444000             🧑  作者: Mango

代码示例1
setInterval(() => {         
  //replaced function() by ()=>
  this.myDate = new Date();
  console.log(this.myDate); 
  // just testing if it is working
}, 1000);