Create GUID/UUID in JavaScript - ASKMEIN CODE

added by JavaScript Kicks
9/20/2018 6:46:46 AM

415 Views

There might be situations where you would be creating GUID in Javascript, Currently JavaScript doesn't have any Built-in method to generate the GUID/UUID. We could use Math.random() or Date().getTime() and generate a random GUID in JavaScript. Example 1: Usage: If you look at the above method we are using the Math.random() and generating the random number and converting it to string.


0 comments