JSFiddle - React, Tailwind, and code Playground
HTML
<p id="out"></p>
JavaScript
var array = [1,2,4,223,53,6,1];
var total = 0;
for( i = 0; i < array.length; i++ ) {
total += i;
}
document.getElementById("out").innerHTML = total;
<p id="out"></p>
var array = [1,2,4,223,53,6,1];
var total = 0;
for( i = 0; i < array.length; i++ ) {
total += i;
}
document.getElementById("out").innerHTML = total;