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.
More Related Contents:
- How to sort an array of integers correctly
- Convert a Unix timestamp to time in JavaScript
- Generate unique random numbers between 1 and 100
- How to create an accurate timer in javascript?
- How do you display JavaScript datetime in 12 hour AM/PM format?
- How to get distinct values from an array of objects in JavaScript?
- Convert seconds to HH-MM-SS with JavaScript?
- JavaScript seconds to time string with format hh:mm:ss
- Get the time difference between two datetimes
- JavaScript numbers to Words
- Javascript Thousand Separator / string format [duplicate]
- Remove duplicate values from JS array [duplicate]
- How do I convert an integer to binary in JavaScript?
- How to parse a time into a Date object from user input in JavaScript?
- Check if string contains only digits
- How to sort numbers correctly with Array.sort()? [duplicate]
- add commas to a number in jQuery
- Get decimal portion of a number with JavaScript
- How to round time to the nearest quarter hour in JavaScript?
- How do I round a number in JavaScript?
- How to tell .hover() to wait?
- JavaScript adding decimal numbers issue [duplicate]
- Sync JS time between multiple devices
- Converting Youtube Data API V3 video duration format to seconds in JavaScript/Node.js
- JavaScript Number preserve leading 0
- Javascript Number Prototype Set Value Directly [duplicate]
- Why is it that parseInt(8,3) == NaN and parseInt(16,3) == 1?
- JavaScript NTP time
- How to get the modified time of a file being uploaded in JavaScript?
- Is there any JavaScript standard API to parse to number according to locale?