JSFiddle - React, Tailwind, and code Playground
JavaScript
var myArray = [1000,3000,6000,4544];
var total = 0;
for (i=0; i<myArray.length; i++) {
total += myArray[i];
}
alert(total);
/*.reverse(); reverse the order of arrays
.sort(); sort alphanumericly
.join(); join in one string divided by comma
.pop(); takes out the last element and put in a variable
.push(344); add to the last space
*/