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
Here's a one liner. It assumes the item will be in the array.
var items = [523, 3452, 334, 31, 5346] var replace = (arr, oldVal, newVal) => (arr[arr.indexOf(oldVal)] = newVal, arr) console.log(replace(items, 3452, 1010))