continue is used to skip
an iteration of a loop
by immediately ending
the current iteration of the loop,
and
moving to the next iteration.
The code given below is used to display
the even numbers from 1 to 10
using a while loop.
During each iteration,
we check the value of iteration
to see if it is odd,
using the condition - iteration % 2 === 1.
If the condition is true,
the continue statement is executed,
which ends the current iteration
and
starts the next iteration of the loop.
The code given above
is used to display
the odd numbers
from 1 to 10
using a for loop.