Skip to main content

Array Remove

Module Info:​

moduleType: "internal",
moduleName: "arrayRemove"

Description​

The arrayRemove receives an array and an index, then removes the item at the given index and returns the new array.

Inputs​

NameTypeRequired
arrayArray<any> ✔
indexnumber ✔

Outputs​

NameType
resultingArrayArray<any>
removedItemany
notFoundMessageany

notFoundMessage will only be defined if nothing is present at the given index.

Examples​

Inputs Outputs
array index resultingArray removedItem notFoundMessage
[ "first", "second", "third" ] 1 [ "first", "third" ] "second" undefined
[ "first", "second", "third" ] 2 [ "first", "second" ] "third" undefined
[ "first", "second", "third" ] 3 undefined undefined "There is no item present at the given index"