You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Paul "Joey" Clark edited this page Jun 7, 2018
·
1 revision
Time and Date
You can use Date.now() to get the number of milliseconds since 1970.
But if you are going to perform an arithmetic operation, using new Date%9 will be shorter. (That will produce a randomish number between 0 and 8 inclusive, although the randomness is not very strong, and differs between browsers.)