JS 随机数

201 阅读1分钟
const genNonDuplicateID = () => {
  return (
    Math.random().toString().substr(2, 5) +
    new Date().getTime() +
    Math.random().toString().substr(2, 5)
  );
};