JavaScript中可以在某个元素前使用 ‘+‘ 号,这个操作是将该元素转换成Number类型,如果转换失败,那么将得到 NaN,
+new Date() 将会调用 Date.prototype 上的 valueOf() 方法,
根据MDN,Date.prototype.value方法等同于Date.prototype.getTime()
下面的代码效果相同:
    console.log(+new Date());
    console.log(new Date().getTime());
    console.log(new Date().valueOf());
    console.log(new Date() * 1);
原文:https://www.cnblogs.com/zhangxingxia/p/13666440.html