1function makeid(length) {
2 var result = '';
3 var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
4 var charactersLength = characters.length;
5 for ( var i = 0; i < length; i++ ) {
6 result += characters.charAt(Math.floor(Math.random() *
7 charactersLength));
8 }
9 return result;
10}
11
12console.log(makeid(5));