Replace loop with forEach.