Trường · Array Elements

Trường · Array Elements · helpers.arrayElements. Phương thức tạo · Ví dụ

helpers.arrayElements

Cài đặt trình tạo

Tạo dữ liệu để xem kết quả ở đây.

Tham số & Ví dụ

Returns a subset with random elements of the given array in random order.

helpers.arrayElements(array: ReadonlyArray<T>, count?: NumberOrRange)
array
Array to pick the value from.
count
Number or range of elements to pick. When not provided, random number of elements will be picked. When value exceeds array boundaries, it will be limited to stay inside.

Ví dụ

["alpha","gamma"]

Dùng dữ liệu tổng hợp trong môi trường kiểm thử.

Trình tạo liên quan

Khám phá kịch bản