Statements

Overview

Javascript statements.

Methods Summarized

TypeNameSummary

void

Break statement exits a loop.

void

Constant declaration.

void

Continue statement, jumps to next iteration of the loop.

void

do while loop

void

for loop

void

foreach loop

void

If statement

void

If/Else statement.

void

Provides a statement with an identifier that you can refer to using a break or continue statement.

void

Switch statement.

void

try/catch statement

void

try/catch/finally statement

void

Variable declaration

void

while loop

Methods Detailed

break()

Break statement exits a loop.

Returns: void

Sample

break

const()

Constant declaration.

Returns: void

Sample

const #;

continue()

Continue statement, jumps to next iteration of the loop.

Returns: void

Sample

continue

do while()

do while loop

Returns: void

Sample

do
{
}
while ( # )

for()

for loop

Returns: void

Sample

for ( var i = 0 ; i < # ; i++ )
{
}

for each in()

foreach loop

Returns: void

Sample

for ( var item in obj )
{
}

if()

If statement

Returns: void

Sample

if ( # )
{
}

if else()

If/Else statement.

Returns: void

Sample

if ( # )
{
}
else
{
}

label()

Provides a statement with an identifier that you can refer to using a break or continue statement.

For example, you can use a label to identify a loop, and then use the break or continue statements to indicate whether a program should interrupt the loop or continue its execution.

Returns: void

Sample

var i = 0, j;
outer_loop: while (i < 10) {
	i++;
	j = 0;
	while (j < 10) {
		j++;
		if (j > i) continue outer_loop;
		application.output("i=" + i + ", j=" + j);
	}
}

switch()

Switch statement.

Returns: void

Sample

switch( # )
{
case:
default:
}

try catch()

try/catch statement

Returns: void

Sample

try
{
	#
}
 catch(#)
{
	#
}

try catch finally()

try/catch/finally statement

Returns: void

Sample

try
{
	#
}
 catch(#)
{
	#
} finally
{
	#
}

var()

Variable declaration

Returns: void

Sample

var #;

while()

while loop

Returns: void

Sample

while ( # )
{
	#
}

Last updated