Answers for "random letter from the alphabet javascript"

1

javascript random letter generator

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));
Posted by: Guest on September-02-2021
0

random alphabet javascript

Math.random().toString(36).substr(2, 5);
Posted by: Guest on June-21-2020

Code answers related to "random letter from the alphabet javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language