what is looping in j.s
Source: Dev.to
Looping in JavaScript
Looping in JavaScript is useful when you want to perform the same task again and again without writing the same code repeatedly.
Types of loops
forloopwhileloopdo...whileloopfor...ofloopfor...inloop
These are the main looping constructs available in JavaScript.
While loop
A while loop in JavaScript repeats a block of code as long as a condition is true.
It is called an entry‑controlled loop because the condition is checked before the code runs.
let i = 0;
while (iImportant: If you forget to update the loop variable, the condition may never become false, resulting in an infinite loop.

