Array At
Module Info:
moduleType: "internal",
moduleName: "arrayAt"
Description
The arrayAt
function gets the value of the item in the nth position of the array.
Inputs
Name | Type | Required |
---|---|---|
array | Array<any> | ✔ |
index | number | ✔ |
Outputs
Name | Type |
---|---|
found | any |
notFoundMessage | string |
Examples
Inputs | Outputs | ||
---|---|---|---|
array | index | found | notFoundMessage |
[ "first", "second", "third" ] | 0 | "first" | undefined |
[ "first", "second", "third" ] | 2 | "third" | undefined |
[ "first", "second", "third" ] | 3 | undefined | "There is no item present at the given index" |