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
The easiest way is to use some libraries like underscorejs and map method.
var items = Array(523,3452,334,31,...5346); _.map(items, function(num) { return (num == 3452) ? 1010 : num; }); => [523, 1010, 334, 31, ...5346]