SyntaxFix
Write A Post
Hire A Developer
Questions
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]