No results for

Powered byAlgolia

randomString(length)

suggest edits

Function returns a random string of a given length.

ParameterTypeDescription
lengthintLength of the random string

Returns

TypeDescription
anyRandom item from the array

Example

import { randomString } from "https://jslib.k6.io/k6-utils/1.0.0/index.js";
export default function() {
let randomName = randomString(8);
console.log(`Hello, my name is ${randomName}`)
}