js for each element in array i want to add one to total code example
Example 1: js array add every element of array
var array = ['a', 'b', 'c'],
result = array.reduce((r, a) => r.concat(a, 0), [0]);
console.log(result);
Example 2: javascript add 1 to each element in array
var numberarr2 = numberarr.map( function(value) {
return value - 1;
} );