SHIFT + D

replace

Updated on August 22, 2024Source codeTests

createReplace is a pipe that transforms an array to an array with an item at a given index replaced with a new item.

Create replace

Call createReplace with these parameters to create your replace function:

Parameter
Type
Required
Description
index
number
yes
The index of the item to replace.
replacement
any
yes
The item to replace the item at the given index with.

reorderresults

Edit doc on GitHub

ON THIS PAGE

replaceCreate replace