const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
/**
* Generate any string and use it everywhere
* @param {int} the length of the string you zqnt to generate
* @returns string
*/
function VanillaGenerate(length) {
let result = '';
const charactersLength = characters.length;
for (let i = 0; i < length; i++) {
result += characters[Math.floor(Math.random() * charactersLength)];
}
return result;
}
/**
* Exemple
*/
let uuid = VanillaGenerate(21);
console.log(uuid);
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)