JSFiddle - React, Tailwind, and code Playground

by dshilkret

JavaScript

function generateUniqueId() {
  var timestamp = new Date().getTime(); // Get the current timestamp
  var randomNum = Math.random().toString(36).substr(2, 9); // Generate a random number and convert to a string
  var uniqueId = timestamp.toString(36) + randomNum; // Combine the timestamp and random number
  return uniqueId;
}
var  uniqueId = generateUniqueId();
console.log("UniqueId: " + uniqueId);