Skip to main content

array_pick_best_element

array_pick_best_element(array, scoreFunction) ⇒ T | undefined

Picks element with highest score from the array using supplied scoring function. If multiple elements with the same highest score exist, the result will be first such encountered element

Kind: global function

ParamType
arrayArray.<T>
scoreFunctionfunction