Skip to content

Array functions

Functions related to arrays

removeFromArray(item, array)

Remove an item from an array

Type parameters

  • <ItemType>

Parameters

  • item - Item to remove from the array
    • Type: ItemType
  • array
    • Type: ItemType[]

randomFromArray(array)

Get a random item from an array

Type parameters

  • <ItemType>

Parameters

  • array
    • Type: ItemType[]

Returns

  • Type: ItemType

removeDuplicatesFromArray(array)

Removes all duplicate items from an array and returns the array

Type parameters

  • <ItemType>

Parameters

  • array
    • Type: ItemType[]

Returns

  • Type: ItemType[]

Built by Prozilla