DEV Community

Discussion on: How to Generate Unique ID in JavaScript

Collapse
 
wolffe profile image
Ciprian Popescu

Depending on the application, this is the right way to do it. In my case, I don't have a loop, I have several elements being displayed on subsequent clicks, and there's several seconds between each click. So there's zero chances of an identical ID.