Okay, I'm adding a value to each value in the array and I want to replace the sum of the two values for each array value with the existing array. If this function was initated again, it would add on top of the "new" array.
var howMuch = 1;
var numbers = [
700,
800,
900,
1000,
1100,
1200,
1300,
1400,
1500,
1600,
1700,
1800,
1900
];
function change (string) {
if(string === 'success'){
for(var i = 0; i < numbers.length){
return numbers[i] + howMuch;
}
}
}
change('success');
// I'm expecting the global numbers array to be
701,
801,
901,
1001,
1101,
1201,
1301,
1401,
1501,
1601,
1701,
1801,
1901
];
and if ran again:
702,
802,
902,
1002,
etc........
THANK YOU IN ADVANCE!!!!