Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to generate 6 random alphanumerals in js

let characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
let result = ''
let length = 10 // Customize the length here.
for (let i = length; i > 0; --i) result += characters[Math.round(Math.random() * (characters.length - 1))]
console.log(result)
 
PREVIOUS NEXT
Tagged: #generate #random #alphanumerals #js
ADD COMMENT
Topic
Name
5+9 =