What is a continue statement:- genius student



  • The continue statement used to break one iteration in the loop(one execution).
  • If a specified condition occurs, and continues with the next iteration in the loop.
Syntax
continue [label];

Code:-

<!DOCTYPE html>
<html>

<head>
 <meta name="viewport" content="width=device-width, initial-scale=1">
</head>

<body>

 <input type="button" onclick="fun_cntnu()" value="Test break statement">

 <script>
  function fun_cntnu()
  {

   for (i = 0; i < 10; i++)
   {
    if (i == 3)
    {
     continue; //just eleminate the following statement
    }
    alert(i);
   }

  }
 </script>

</body>

</html>
What is a continue statement:- genius student What is  a continue statement:- genius student Reviewed by Network security on October 27, 2019 Rating: 5

No comments:

Useful Information

Powered by Blogger.