DEV Community

Dev Learner
Dev Learner

Posted on

JavaScript DOM and Reduce

DOM:
DOM is a great programming interface for XML or HTML documents. It represents a webpage in such a way that it can be easily modified into a programming language.
When we write HTML to a web page, we can see it with the browser.Again, if you want, you can see the HTML code directly from the resource.Basically what we see in the browser is a pity to see both but from here the document represents in an object-oriented way so that we can help is done with the language of a program.We can easily make an html5 dynamic in JavaScript.
Some change are:
Creating a new element Removing an existing.
Element Modifying an existing element.
Modifying a view Adding Removed.
Adding spelling Adding Removed.
Modifying Create.

Life has many uses for JavaScript manipulation.But we can easily do the manipulation through JavaScript so that the website does not take more people. This will make the website load faster and cost more MB.The address of a website can be presented in a very interactive way through Don Money Population. How to show a site and how beautiful it will be. Everything is determined by thoperation

Reduce:
Reduce is like filters, that's not the point. We talk to the earlist of the program about the function of the ear. It's easy to hold on to the end of a particular reading at a certain time. May be perfect for operation

Example:
var array=[2,3,54,23]
var totalNum=array.reduce((sum){
return sum;
},
0);

Reault:

Total:82

Top comments (0)