The most viewed items
const tnwNum = [70, 30, 20, 10, 7];
function tnwFun1(){
document.getElementById("demo").innerHTML = tnwNum.join("
");
}
function tnwFun2(){
var result = tnwNum.reduce(tnwFun3);
document.getElementById("demo").innerHTML = result;
}
function tnwFun3(leftNum, sum){
return leftNum - sum;
}
No comment to show.