Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js random string

const random = 'abcdefghijklmnopqrstuvwxyz123456789'
const size = 8
let code = ""

for(let i = 1; i < size; i++) {
   code += random[Math.abs(Math.floor(Math.random() * random.length))]
}

console.log(code.toUpperCase())
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #random #string
ADD COMMENT
Topic
Name
8+4 =