`+new Date()` returns the milliseconds since epoch, whereas `.getMilliseconds()` only returns the milliseconds since the last second - but `Date.now()` can be used instead.