To create unique IDs with JavaScript, we can use a timestamp.
For instance, we write
const uniq = "id" + new Date().getTime();
to create a new date object with the current time with the Date
constructor.
And we get its Unix timestamp in milliseconds with getTime
.