Java Reference
In-Depth Information
declarations
These keywords declare variables or functions in JavaScript code.
stateMent
introduced
description
JavaScript 1.0
Used to declare a variable. Initializing it to a value is optional
at the time of declaration.
var
JavaScript 1.0
Used to declare a function with the specified parameters,
which can be strings, numbers, or objects. To return a value,
the function must use the return statement.
function
loop
Loops execute a block of code while a specified condition is true .
stateMent
introduced
description
JavaScript 1.2
Executes the statements specified until the test condition
after the while evaluates to false . The statements are
executed at least once because the test condition is
evaluated last.
do...while
JavaScript 1.0
Creates a loop controlled according to the three optional
expressions enclosed in the parentheses after the for and
separated by semicolons. The first of these three expressions
is the initial‐expression, the second is the test condition, and
the third is the increment‐expression.
for
JavaScript 1.0
Used to iterate over all the properties of an object using a
variable. For each property the specified statements within
the loop are executed.
for...in
JavaScript 1.0
Executes a block of statements if a test condition
evaluates to true . The loop then repeats, testing the
condition with each repeat, ceasing if the condition
evaluates to false .
while
JavaScript 1.0
Used within a while or for loop to terminate the loop and
transfer program control to the statement following the
loop. Can also be used with a label to break to a particular
program position outside of the loop.
break
JavaScript 1.2
An identifier that can be used with break or continue
statements to indicate where the program should continue
execution after the loop execution is stopped.
label
Search WWH ::




Custom Search