Mark As Completed Discussion

Let's test your knowledge. Click the correct answer from the options.

What is the purpose of a loop in JavaScript?

Click the option that best answers the question.

  • To iterate over an array and perform a specific action on each element
  • To store multiple values in a single variable
  • To control the flow of code execution based on a condition
  • To organize and manipulate collections of data