Each item of this array is some number.
var items = Array(523,3452,334,31, ...5346);
How do I replace some number in with array with a new on
A functional approach to replacing an element of an array in javascript:
const replace = (array, index, ...items) => [...array.slice(0, index), ...items, ...array.slice(index + 1)];