Changed for loop to array.forEach().