DEV Community

loading...

Discussion on: How to Generate Unique ID in JavaScript

Collapse
urielbitton profile image
Uriel Bitton

Math.random does neither generate truly random numbers nor are they unique. Its randomness is of course based on the range you provide and that is its own shortcoming. The other methdos you mentioned are a lot more unique and more random.
Cheers!

Forem Open with the Forem app