x
 
1
<!DOCTYPE html>
2
<title>My Example</title>
3
4
5
<p id="msg"></p>
6
7
<script>
8
  // Set variables
9
  var i = 0;
10
  var output = "";
11
12
  // Do the 'while' loop
13
  while (i < 5) {
14
    i ++;
15
    if  (i === 3) { 
16
      continue; 
17
      }
18
      
19
    output += i + "<br>";
20
    
21
  }
22
23
  // Output results to the above HTML element
24
  document.getElementById("msg").innerHTML = output;
25
</script>