Category Hierarchy

我是Node的新手,我正在学习node中的Date()对象、值和日期格式。当我运行以下代码时,我在控制台中得到了不同的输出。

?

const date_1 = new Date();
console.log(date_1);
const date_2 = new Date();
console.log(+date_2);
const date_3 = new Date();
console.log('comma:',date_3);
const date_4 = new Date();
console.log('plus:'+date_4);

?

在控制台中给出以下输出?

2018-02-01T06:55:41.327Z
1517468141327
comma: 2018-02-01T06:55:41.327Z
plus:Thu Feb 01 2018 12:25:41 GMT+0530 (India Standard Time)

有人能让我知道我在理解方面缺少了什么吗?

转载请注明出处:http://www.xjzhisheng.com/article/20230329/1599515.html