showing results for - "react native get numeric random string length of 5 characters"
Nico
28 Jul 2020
1function randomString(length, chars) {
2    var result = '';
3    for (var i = length; i > 0; --i) result += chars[Math.floor(Math.random() * chars.length)];
4    return result;
5}
6var rString = randomString(32, '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ');