DEV Community

Cover image for Better than Math.random() password generator!
Jimmy Willams
Jimmy Willams

Posted on

Better than Math.random() password generator!

https://www.youtube.com/watch?v=ssYo9t37pE4

This tutorial shows you how to create a random password generator function in JavaScript.

The function uses crypto.getRandomValues, which generates more strongly random values than Math.random().

The password length can be determined by passing it in as an argument to the function.

Oldest comments (0)