The most viewed posts

About Desktop Icons in Windows Computer

How to clean up Windows Computer

CCleaner

some (JavaScript Array Method)

Driver Booster

Advanced System Care

Myanmar font and keyboard for Windows

Registry Reviver

How to make a computer secure and run faster

lastIndexOf (JavaScript Array Method)

The most viewed items

Desktop Hard Disk

Dell Inspiron 5559

HP ProBook 430

SONY Playstation Portable

Laptop RAM

External Hard Disk

Laptop

ZilaStar ICT Mar 28 2021, 15:49:16
Category : JavaScript Tutorials

reduce (JavaScript Array Method)

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;
}

  • Comments:

    No comment to show.

    To Contact
    Available Services
    Terms and Conditions