Answers for "how to get string of random characters in typescript"

3

generate random character in javascript

var characters = 'abcdefghijklmnopqrstuvwxyz0123456789';
var result = ""
var chaactersLength = characters.length;

for ( var i = 0; i < 5 ; i++ ) {
    result += characters.charAt(Math.floor(Math.random() * chaactersLength));
}

console.log(result)
Posted by: Guest on January-15-2021
-1

how to randomly generate a string in ts

// Generate a random alphanumerical string of length 11 ( change substring parameter for other length)
Posted by: Guest on March-08-2021

Code answers related to "how to get string of random characters in typescript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language