78
rated 0 times
[
85]
[
7]
/ answers: 1 / hits: 8426
/ 10 Years ago, wed, january 21, 2015, 12:00:00
What is the best way to generate a 32 bit random unsigned number in Node? Here is what I tried:
var max32 = Math.pow(2, 32) - 1
var session = Math.floor(Math.random() * max32);
I need this for a unique id.
More From » node.js