Apr 17, 2018

Random ID / Text generator in Java Script

To generate random ids in JS use the following code:

Math.random().toString(36).substr(2, 9)

The length of the item can be increased/decreased by changing the value in functions toString(36) and substr(2, 9)