JSFiddle - React, Tailwind, and code Playground
JavaScript
var arr = [1,2,3,1,2,3];
var total = 0;
$.each(arr, function(){
total += this;
});
console.log(total);
var arr = [1,2,3,1,2,3];
var total = 0;
$.each(arr, function(){
total += this;
});
console.log(total);