generate a unique ID
uniqueID = (length=6, n=true, lc=true, uc=true) => { // 62^6 = 50 Billion
let chars = '';
if (n) chars += '1234567890';
if (lc) chars += 'abcdefghijklmnopqrstuvwxyz';
if (uc) chars += 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
let ID = '';
for (let i = 0; i < length; i++)
ID += chars[Math.floor((Math.random() * chars.length))];
return ID;
}