Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.
Well done!
You have completed (UPI) Chapter 7: Advanced JavaScript Object Handling!
Instruction
As Integer
The Date can be returned as an integer using the valueOf() method or by prefixing the constructor with a + sign, which is useful for "seeding" a Pseudo Random Number Generator (PRNG) or performing calculations.
const dateAsInteger_1 = new Date().valueOf();
alert(dateAsInteger_1);
const dateAsInteger_2 = +new Date();
alert(dateAsInteger_2);