How is a for loop useful when working with arrays?
A. It allows you to perform different actions on each item in an array.
B. It changes an array's value at a certain index. C. It adds values to the beginning or end of an array.
D. It allows you to perform the same actions on each item in an array.