replace
description
Returns a new array after replacing the value at the provided index
with the provided value
in the input
array. If the index is not found, the input array is simply (shallow) cloned.
Like nearly all methods in conductor, replace is a pure function and will not modify the input array.
Like nearly all methods in conductor, replace
is a pure function and will not modify the input array.
example
Here, we simply replaced the value at index 2
by the value 4.
Last updated