Last active
November 19, 2023 20:47
-
-
Save claeusdev/85fbb35538556c675ae6586ec568afbf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function generateCode(){ | |
return Math.floor(10000000 + Math.random() * 90000000) | |
// // Generate a version 4 (random) UUID | |
// const uuid = uuidv4(); | |
// // Extract the first 8 characters to get an 8-digit ID | |
// const studentId = uuid.substring(0, 8); | |
// // call .toString() if you need it as a string. | |
} | |
const { v4: uuidv4 } = require('uuid'); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment