title: How to list the items using "forEach" function in arrays javascript only
body: <p>I need to list the items with set of object arrays, i could not get it.. pls help me</p>
  
  <pre><code>&lt;script&gt;
  var emp = [ {firstname: "raj", id:111, age:30; salary:3567},
              {firstname: "uva", id:222, age:35; salary:4567},
              {firstname: "pup", id:333, age:32; salary:7865},
              {firstname: "rav", id:444, age:33; salary:7654}];
  
  var emplist = emp.length;
  
  var doc = "&lt;div&gt;";
      for(i=0; i &lt; emplist; i++){
          doc += "&lt;p&gt;" + emp[i].firstname + emp[i].id + emp[i].age + emp[i].salary + "&lt;/p&gt;";
      }
      doc += "&lt;/div&gt;";
      document.getElementById("demo2").innerHTML = doc;
  &lt;/script&gt;
  </code></pre>