var

The var statement declares variables, and optionally initializes them.

var variable [ = value ] [, variable2 [ = value2], ...]

label: statement

Indicates that starting point of a statement block.

labelName: statements

this

this.property

Refers to the current object and is commonly used when setting multiple properties. EG:

function Car(color, make, model) {
    this.color = color;
    this.make = make;
    this.model = model;
}

Another common usage is to pass the current form to a function. EG:

<input type="button" value="Run" onClick="RunMe(this.form)">

typeof

typeof expression
typeof (expression)

Returns string indicating the type in JS. The 6 types in JS are as follows.

There are some particular about applying typeof on different global objects or functions. EGs:

with

with (object) {
  statement;
}

Establishes the default object for the statement. Assumes that each variable in the statement is a property/object of the default object.

Reserved Words

The following table lists reserved words that cannot be used as JavaScript variables, member names, function parameters, or statement labels. Oddly enough, only the ones in bold below are even used by JavaScript, the rest are reserved according to the ECMAScript specifications.

abstract
boolean
break
byte
case
catch
char
class
const
continue
debugger
default
delete
do
double
else
enum
export
extends
false
final
finally
float
for
function
goto
if
implements
import
in
instanceof
int
interface
long
native
new
null
package
private
protected
public
return
short
static
super
switch
synchronized
this
throw
throws
transient
true
try
typeof
var
void
volatile
while
with

Intrinsic Properties

These are top level properties that are neither user defined variables or properties associated with objects.

Page Modified: (Hand noted: 2003-05-15 00:00:00Z) (Auto noted: 2008-10-16 21:19:56Z)