var d1 = new Date("2000/01/01 00:00:00");
var d2 = new Date("2000/01/01 00:00:01"); //one second later
var t = d2 - d1; //will be 1000 (msec) = 1 sec
typeof t; // "number"
现在如果你检查d1-0的类型,它也是一个数字:
t = new Date() - 0; //numeric value of Date: number of msec's since 1 Jan 1970.
typeof t; // "number"