Universally Unique Identifier (UUID)
function uuidv4() {  const init = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";  return init.replace(/[xy]/g, (c) => {    const r = Math.random() * 16 | 0;    const v = c == 'x' ? r : (r & 0x3 | 0x8);    return v.toString(16);  });}
uuidv4(); // => 2fb0c438-a38b-4be0-9d53-df309a2ded95uuidv4(); // => 6f48aa1a-fd44-454b-b796-bca06070d624

Harry Manchanda

Full Stack JavaScript Developer, Frontend Web Developer | Microservices & DevOPS Enthusiast. | https://www.harrymanchanda.com/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store