There was an error while loading. Please reload this page.
Useful methods to deal with arrays.
Gets a random element from a given array.
import{getRandomItem}from'@jsweb/utils/modules/array'constarray=[1,2,3,4,5]constrandom=getRandomItem(array)// returns a random item from the array