JScript Statements (Windows Scripting - JScript)

 

The following table lists JScript statements.

Statements

Description

Language Element

Terminates the current loop, or if in conjunction with a label, terminates the associated statement.

break Statement

Contains statements to execute when an error occurs in code within the try block.

catch Statement

Activates conditional compilation support.

@cc_on Statement

Causes comments to be ignored by the JScript parser.

Comment Statements

Stops the current iteration of a loop, and starts a new iteration.

continue Statement

Starts the debugger.

debugger Statement

Executes a statement block once, and then repeats execution of the loop until a condition expression evaluates to false.

do...while Statement

Executes a block of statements for as long as a specified condition is true.

for Statement

Executes one or more statements for each element of an object or array.

for...in Statement

Declares a new function.

function Statement

Conditionally executes a group of statements, depending on the value of an expression.

@if Statement

Conditionally executes a group of statements, depending on the value of an expression.

if...else Statement

Provides an identifier for a statement.

Labeled Statement

Exits from the current function and returns a value from that function.

return Statement

Creates variables used with conditional compilation statements.

@set Statement

Enables the execution of one or more statements when a specified expression's value matches a label.

switch Statement

Refers to the current object.

this Statement

Generates an error condition that can be handled by a try...catch statement.

throw Statement

Implements error handling for JScript.

try Statement

Declares a variable.

var Statement

Executes a statement until a specified condition is false.

while Statement

Establishes the default object for a statement.

with Statement