Loops or Iterations in JavaScript