JS Built-ins
cryptoadvanced

crypto β€” consecutive UUIDs are different

πŸ“– Usage Example
const record = { id: crypto.randomUUID(), name: 'item' }

Use crypto.randomUUID() to assign unique IDs to records without a server.

crypto.randomUUID() β€” uniqueness

Each call to crypto.randomUUID() generates a different UUID. Two consecutive UUIDs should not be equal.

Challenge: Verify that two UUIDs generated in succession are different.

πŸ’‘ Hints (1)
  • β€’ UUIDs are designed to be statistically unique, so collisions are astronomically unlikely