Random
Random number in a range
function getRandumNumber(min, max) { return Math.floor(Math.random() * (max - min + 1) + min); }
Random number with fixed length
function getRandumNumber(length) { const min = Math.pow(10, (length-1)); const max = Math.pow(10, (length)); return Math.floor(Math.random() * (max - min) + min); }
Random string
Random UUID
Random color
Random date
Random date in a range
Last updated