CommonRandomItemFromList CallableCommonRandomItemFromList<T>(ItemPrevious, ItemList): TGet a random item from a list while making sure not to pick the previous one. Function expects unique values in the list. If there are multiple instances of ItemPrevious, it may still return it.ParametersItemPrevious: TPreviously selected item from the given listItemList: readonly T[]List for which to pick a random item fromReturns TThe randomly selected item from the list
Get a random item from a list while making sure not to pick the previous one. Function expects unique values in the list. If there are multiple instances of ItemPrevious, it may still return it.