create unique id with javascript
another way it to use the millisecond timer:
var uniq = 'id' + (new Date()).getTime();
const uid = function(){ return Date.now().toString(36) + Math.random().toString(36).substr(2);}
This Function generates very unique IDs that are sorted by its generated Date.Also useable for IDs in Databases.