Statements
Overview
The Statements
class provides essential control flow and error-handling structures for JavaScript. It enables managing loops with various conditions, , decision-making and handling errors.
The class also supports declaring variables with js_flow_var()
and constants with js_flow_const()
, offering flexibility in managing data within the code.
Methods Summarized
void
Provides a statement with an identifier that you can refer to using a break or continue statement.
Methods Detailed
break()
Break statement exits a loop.
Returns: void
Sample
const()
Constant declaration.
Returns: void
Sample
continue()
Continue statement, jumps to next iteration of the loop.
Returns: void
Sample
do while()
do while loop
Returns: void
Sample
for()
for loop
Returns: void
Sample
for each in()
foreach loop
Returns: void
Sample
if()
If statement
Returns: void
Sample
if else()
If/Else statement.
Returns: void
Sample
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
switch()
Switch statement.
Returns: void
Sample
try catch()
try/catch statement
Returns: void
Sample
try catch finally()
try/catch/finally statement
Returns: void
Sample
var()
Variable declaration
Returns: void
Sample
while()
while loop
Returns: void
Sample
Last updated