JavaScript Wiki
Advertisement

A keyword is a reserved word which has a special meaning in JavaScript. See also word operators if this page fails to list the word which you are interested in.

break

Used to exit loops, switch...case statements and labeled block statements.

case

Necessarily organizes switch...case statements. (It can technically be omitted, but this renders the entire statement useless.)

catch

Necessarily extends try...catch statements to handle errors.

continue

Exits single iterations of loops.

default

Further organizes switch...case statements.

do

Begins do...while loops.

else

Optionally extends if statements.

false

A Boolean constant which represents falsehood.

finally

Optionally extends try...catch statements to execute commands regardless of whether any error was thrown in the try block and whether any errors remained uncaught.

for

Begins for loops.

goto

Enters labeled blocks from anywhere.

if

Begins if statements.

return

Used within functions to exit the function and set the value of the function call.

switch

Begins switch...case statements.

this

An immutable variable used inside methods to reference the owning objects. See this (computer science).

true

A Boolean constant which represents truth.

try

Begins try...catch statements.

var

Declares a variable in anticipation of its use to prevent certain scoping issues involving functions.

var x;

x is undefined.

while

Begins while loops and ends do...while loops.

with

Begins with statements.

Advertisement