Appearance
从数组中获取一个随机元素。
import { sample } from '@base-web-kits/base-tools-ts'; sample([1, 2, 3, 4]); // 结果: 2 (随机)
collection (Array)
(any)