forEach method

forEach * ()
* - This method only supports more than ie8 browser
* -forEach method requires a function as a parameter
* - function like this, we could not help but created by our call, we call a callback function
* array consists of several elements function executes several times, each time the browser will traverse the elements
* passed in the form of argument, we can define the parameter, read the contents
* browser passed in the callback function three parameters:
* the first parameter is currently traversing elements
* the second parameter is the index of the current element being traversed
* the third parameter is being iterated array
* /

Guess you like

Origin www.cnblogs.com/lw1998/p/11401302.html