Added code to iterate names array with a for loop and a forEach loop