Forum Discussion
yash_verma
5 years agoNew Contributor
sorry I am using math. Randomuuid () only. So this function you are saying will never return same guids.? Pls let me know as if it return duplicates than my solution will be ruined.
- ptaylor5 years agoEmployee
I see. Well, a random UUID is a 128-bit random value, so repeated values are VERY unlikely. But if you wanted to guarantee uniqueness, you could concatenate a timestamp:
Math.randomUUID() + Date.now().getTime()