lookup() Function

Returns location of data within multiple values, or valueIfNotPresent.

Syntax

lookup( multipleValues, dataToLookup, valueIfNotPresent )

multipleValues: (Any Type) Values to lookup within.

dataToLookup: (Any Type) Value to lookup within multipleValues.

valueIfNotPresent: (Any Type) Value to return if dataToLookup is not present.

Returns

Integer

Examples

You can experiment with this function in the test box below.

Test Input

lookup({"a", "b", "c", "d"}, "c", -1) returns 3

Open in Github Built: Fri, Mar 11, 2022 (04:59:07 PM)

On This Page

FEEDBACK