Create a unique number with javascript time

A better approach would be:

new Date().valueOf();

instead of

new Date().getUTCMilliseconds();

valueOf() is “most likely” a unique number. http://www.w3schools.com/jsref/jsref_valueof_date.asp.

Leave a Comment