Skip to content

Instantly share code, notes, and snippets.

@yhau1989
Last active April 22, 2020 09:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yhau1989/870f10ccb896d28f0312d3bee6331878 to your computer and use it in GitHub Desktop.
Save yhau1989/870f10ccb896d28f0312d3bee6331878 to your computer and use it in GitHub Desktop.
Generar id único en JavaScript
const idUnic = () => {
let d = new Date();
return `${d.getDate()}${d.getMonth()}${d.getFullYear()}${d.getHours()}${d.getMinutes()}${d.getSeconds()}${d.getMilliseconds()}`;
}
@yhau1989
Copy link
Author

:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment