Tech Study

JavaScript Continue Statement

The continue statement instructs the compiler to skip the rest of the statements below it in the current iteration and immediately begin the next iteration of the loop. When a continue statement is encountered within a loop, the remaining statements within the loop for the current iteration are skipped and the loop continues with the next iteration.

The continue statement is often used within loops to skip certain iterations based on certain conditions.

Syntax:

continue;

Example 1: for loop with continue statement. 

f

or (var j = 1; j < 8; j++) 

{

if (j < 3
{

     continue;

}

console.log (j);

}

Output:

3

4

5

6

7

Example 2: while loop with a continue.

var i = 2;

var n = 2;

while (i < 5
{

  i++;

  if (i === 3
{

       continue;

}

n += i;

console.log (n);

}

Output:

6

11

C String Functions

C String Functions perform certain operations, It provides many useful string functions which can come into action. The <string.h> header …

Read more

Function Pointer in C++

Introduction : Function Pointer in C++ Pointers: In function pointer in c++ are the variables that consist of addresses of …

Read more