Javascript examples for Array:forEach
Access object's member in array forEach function or for iteration
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){//from w w w. j a v a 2s. c o m var numArray = [{1:1},{2:2}]; numArray.forEach(function(value,index){ console.log(value,index,this);//{1:1},0 window }); } </script> </head> <body> </body> </html>