let a=[1,2,3,4,5,6,7,8,9,10];
let s=0;
for(let i=0; i<a.length; i++) { s+= a[i]; }
let n= a.length;
for(let i=0; i<n; i++) { s+= a[i]; }
for(let i=a.length; i--;) { s+= a[i]; }
for(let x of a) { s+=x; }
for(let i in a) if (a.hasOwnProperty(i)) { s+=a[i]; }
let i= -1;
while(++i < a.length) { s+= a[i]; }
let i= -1; let n= a.length;
while(++i < n) { s+= a[i]; }
let i=a.length;
while(i--) { s+= a[i]; }
let i=0;
do { s+= a[i] } while (++i < a.length);
let i=0; let n=a.length;
do { s+= a[i] } while (++i < n);
const it = a.values(); let e;
while (!(e = it.next()).done) { s+= e.value; }
a.map(x => { s+=x });
a.forEach(x => { s+=x });
a.every(x => (s+=x,1) );
a.filter(x => { s+=x } );
a.reduce( (z,c) => { s+=c }, 0 );
a.reduceRight( (z,c) => { s+=c }, 0 );
a.some(x => { s+=x } );
Array.from(a, x=> s+=x);