DEV Community


Discussion on: How to Generate Unique ID in JavaScript

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.

Forem Open with the Forem app