Answers for "react native get numeric random string length of 5 characters"

1

react native get numeric random string length of 5 characters

function randomString(length, chars) {
    var result = '';
    for (var i = length; i > 0; --i) result += chars[Math.floor(Math.random() * chars.length)];
    return result;
}
var rString = randomString(32, '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ');
Posted by: Guest on November-27-2020

Code answers related to "react native get numeric random string length of 5 characters"

Code answers related to "Javascript"

Browse Popular Code Answers by Language