
1
JavaScript
Pocket Reference
The JavaScript Language
JavaScript is a lightweight, object-based scripting language
that can be embedded in HTML pages. This book starts with
coverage of the core JavaScript language, followed by mate-
rial on client-side JavaScript, as used in web browsers. The
final portion of this book is a quick-reference for the core
and client-side JavaScript APIs.
Syntax
JavaScript syntax is modeled on Java syntax, Java syntax, in
turn, is modeled on C and C++ syntax. Therefore, C, C++,
and Java programmers should find that JavaScript syntax is
comfortably familiar.
Case sensitivity
JavaScript is a case-sensitive language. All keywords are in
lowercase. All variables, function names, and other identifi-
ers must be typed with a consistent capitalization.
Whitespace
JavaScript ignores whitespace between tokens. You may use
spaces, tabs, and newlines to format and indent your code in
a readable fashion.