Skip to content

Commit 582356c

Browse files
authored
randomUUID
1 parent 0f3bfaa commit 582356c

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@
4747
|41 | [How to convert an array of key-value tuples into an object](#How-to-convert-an-array-of-key-value-tuples-into-an-object)|
4848
|42 | [Native text to speech JS](#Native-text-to-speech-JS)|
4949
|43 | [toFixed](#toFixed)|
50+
|44 | [generate randomUUID](#generate-random-uuid)|
51+
52+
53+
5054

5155

5256

@@ -939,3 +943,18 @@ Warning: Floating point numbers cannot represent all decimals precisely in binar
939943
2.65.toFixed(1) // Returns '2.6'. Note it rounds down -why??? see the warning above
940944
941945
```
946+
947+
948+
**[⬆ Back to Top](#table-of-contents)**
949+
### generate random uuid
950+
951+
The randomUUID() method of the Crypto interface is used to generate a v4 UUID using a cryptographically secure random number generator.
952+
953+
```javascript
954+
955+
crypto.randomUUID() // print in console '460ff1e6-2106-4848-833d-5c5b3bfdc943'
956+
957+
crypto.randomUUID() // print in console '9a91c014-d1b1-453a-8091-ef8b9b48b14a'
958+
959+
960+
```

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy