DEV Community 👩‍💻👨‍💻

Discussion on: 7 Killer JavaScript One-Liners that you must know

Collapse
prakhart111 profile image
Prakhar Tandon

Quite Helpful,
I would like to add something to the first one.
Math.random is not actually a very good way if you want to use it for generating an id, it's okay if you are using it for some personal project.

Thing is that these functions generate a pseudo random number.
I have explained about this Here in detail.

If you want to generate more "random" random values, you can check out the Crypto global Here on MDN

Cheers and following you now !