Appendix B. JavaScript Core Reference

This appendix outlines the syntax of all the JavaScript core language functions and objects with their properties and methods. If changes have occurred between versions, they have been noted.

Browser Reference

The following table outlines which JavaScript version is in use and in which browser it is used. Note that Internet Explorer implements Jscript, Microsoft's version of JavaScript. However, Jscript's features are relatively the same as JavaScript.

JavaScript Version

Netscape Navigator

Mozilla Firefox

Internet Explorer

Safari / Chrome

Opera

1.0

2.x

 

3.0

  

1.1

3.x

    

1.2

4.0–4.05

    

1.3

4.06–4.7x

 

4.0

  

1.4

5.0

    

1.5

6.x

1.0

5.5, 6, 7, 8

3.0, 3.1

6, 7, 8, 9

1.6

6.2

1.5

 

3.2, 4.0

1.0

1.7

 

2.0

   

1.8

 

3.0

   

1.8.1

 

3.5

   

Reserved Words

Various words and symbols are reserved by JavaScript. These words cannot be used as variable names, nor can the symbols be used within them. They are listed in the following table.

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

 

-

!

~

%

/

*

>

<

=

&

^

|

+

?

 

Other Identifiers to Avoid

It is best to avoid the use of the following identifiers as variable names.

JavaScript 1.0

abs acos anchor asin atan atan2 big blink bold ceil charAt comment cos ...

Get Beginning JavaScript®, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.