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
indexnumber
yes
The index of the item to replace.
replacementany
yes
The item to replace the item at the given index with.