Introduction to JavaScript

Presented at ~conf July 14, 2003 by Andrew Hedges, Design Team Manager, Interactive Multimedia Applications Group

Cautions When Using JavaScript

JavaScript can do a lot of things, but it is not the solution to every problem. Here are some things to keep in mind.

  • Do not rely on JavaScript. Globally over 10% of users disable it. Especially for form validation or other instances where data is at stake, always have a server-side equivalent.
  • There are differences in the JavaScript implementations of the dozens of browsers out there. Test your scripts on every browser/platform combination you possibly can!
  • Several words are reserved by JavaScript (do not use these as function or variable names):
Reserved Words
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

Document URL: http://www.gwu.edu/~ahedges/javascript/
Copyright © 2003, The George Washington University. All rights reserved.