The most viewed items
const tnwNum = [20, 9, 20, 8, 100];
function tnwFun1(){
document.getElementById("demo").innerHTML = tnwNum.join(", ");
}
function tnwFun2(){
var result = tnwNum.reduceRight(tnwFun3);
document.getElementById("demo").innerHTML = result;
}
function tnwFun3(numRight, sum){
return numRight - sum;
}
No comment to show.