Changed for loop in conway function to array.forEach