|
47 | 47 | |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)|
|
48 | 48 | |42|[Native text to speech JS](#Native-text-to-speech-JS)|
|
49 | 49 | |43|[toFixed](#toFixed)|
|
| 50 | +|44|[generate randomUUID](#generate-random-uuid)| |
| 51 | + |
| 52 | + |
| 53 | + |
50 | 54 |
|
51 | 55 |
|
52 | 56 |
|
@@ -939,3 +943,18 @@ Warning: Floating point numbers cannot represent all decimals precisely in binar
|
939 | 943 | 2.65.toFixed(1) // Returns '2.6'. Note it rounds down -why??? see the warning above
|
940 | 944 |
|
941 | 945 | ```
|
| 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 | +``` |