valueOfintermediateconst d = new Date('2024-01-15T00:00:00.000Z')
d.valueOf() // β 1705276800000
d.valueOf() === d.getTime() // β trueUse valueOf() to get the millisecond timestamp of a Date; it equals getTime() and is called automatically in arithmetic expressions.
valueOf() and getTime() return the same number.
Challenge: Verify that new Date(0).valueOf() === new Date(0).getTime().