Added iterating arrays in JavaScript using for each loop