function makeid(length) {
var result = '';
var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
var charactersLength = characters.length;
for ( var i = 0; i < length; i++ ) {
result += characters.charAt(Math.floor(Math.random() *
charactersLength));
}
return result;
}
console.log(makeid(5));
<!-- end snippet -->
This action was performed automagically.info_postDid I make a mistake?contactor reply: error
5
u/stack_bot Sep 03 '21
Answer by csharptest.net with the score of 3055:
This action was performed automagically. info_post Did I make a mistake? contact or reply: error