let d Date console log d console log String d console log d toString console log new Date console log Date now number of milliseconds elapsed since January 1 1970 00 00 00 UTC Using Date objects let start Date now do something to waste time for let i 0 i 100000 i for let b 0 b 100 b let k Math sqrt i k i 1 for b for i let end Date now let elapsed end start elapsed time in milliseconds console log Milliseconds elapsed YYYY MM DD HH MM SS console log new Date toISOString slice 0 19 replace T
i for let b 0 b 100 b let k Math sqrt i k i 1 for b for i let end Date now let elapsed end start elapsed time in milliseconds console log Milliseconds elapsed YYYY MM DD HH MM SS console log new Date toISOString slice 0 19 replace T