16.
Which method can be used to iterate through each element of an array in JavaScript?
forEach()
map()
for loop
some()
Correct: A, C
The forEach() method and for loop can be used to iterate through each element of an array in JavaScript. The forEach() method executes a provided function once for each element in the array, whereas a for loop allows you to manually iterate through each element using an index or iterator variable. Both methods are commonly used for iterating through arrays and performing operations on each element.