Tweakr
    Preparing search index...

    Function randomString

    • Generates a random alphanumeric string of the specified length.

      Parameters

      • length: number

        The desired length of the output string.

      Returns string

      A random string containing uppercase letters, lowercase letters, and digits.

      1.1.0

      randomString(8); // "aZ3kP9xQ"
      randomString(16); // "G4h9B2jL0mN7pQwR"