How to loop array javascript

  javascript

I want to look through an array that has nested objects.
like

var g = [{}, {}];

I did it like below.

g.forEach(i => {console.log(i)})

Source: Ask Javascript Questions

LEAVE A COMMENT