Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const a = () => {
- let a = '';
- for (let i = 0; i < 32; i += 1) {
- if ([8, 12, 16, 20].includes(i)) {
- a += '-';
- }
- let n;
- if (i == 12) {
- n = 4;
- } else {
- const d = Math.random() * 16 | 0;
- if (i == 16) {
- n = (d & 3) | 0;
- } else {
- n = d;
- }
- }
- a += n.toString(16);
- }
- return a;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement