ForEach loop on array

Another way to iterate over the elements of an array is to use the forEach method of the array. It gets a function as an argument and it will call that function with each one of the values of the array.

"use strict";

var names = ["Foo", "Bar", "Qux"];
names.forEach(function(v) {
// Foo
// Bar
// Qux