Skip to main content

array_push_if_unique

array_push_if_unique(array, element) ⇒ boolean

Adds an element to the end of the array, iff the element is not present in the array already

Kind: global function
Returns: boolean - true iff added, false if the array already contains this element

ParamTypeDescription
arrayArray.<T>where
elementTwhat to add