<SCRIPT> tag 12
creating while statement 84
declaring new array inside 159
HTML tags 377
using with Macs 16
search method, String object
regular expression methods 322
Select object, event handlers 263
server-side processing 376
setInterval method, Global object 290 , 295
setTimeout method, Global object 290 , 391
shared members, introduction to OOP 196
SimpleText program, Mac15
limitations of 231
slide show, creating 388
creating form 389
generating random numbers 389
loading photos 391
sort method, Array object 173
sorting arrays
case-insensitive sorting 179
custom comparison function 175
numerical sorting 176
sparse arrays 146
iterating through 148
split method, String object 300 , 311
regular expression methods 322
splitting a string 309
src attribute
<IMG> tag 385, 388
src property, Image object 383
stack, popping and pushing 158
stack, implementing as array 158
general example 161
displaying contents 163
HTNL form tags 161
popping the stack 165
pushing the stack 162
simple example 158
statements 4
See also individual statements and loops
comments 35
creating blocks 41
ended or terminated 34
keywords and operators 19
tokens 34
use of semicolon 34
variables and values 19
string concatenation operator (+) 24
mistaken for plus operator 109
String function
creating String object 301
type conversion 112, 143
string literal 26
string manipulation
converting a string to upper case 304
creating and displaying a link 302
importance of 299
playing with strings example 308
capitalizing words in string 310
complete listing 317
counting words in string 311
reversing a string 315
reversing words in string 313
splitting a string 309
user interface 308
regular expressions 320
String object 219
creating 301
deploying regular expressions 320
generating HTML, methods 301
length property 80, 88, 203
methods 300
fromCharCode method 266
match method 336
split method 311
substring method 81, 311
toUpperCase method 180, 311
regular expressions methods 322
string manipulation 300
string types 20
strongly typed languages 32
understanding 111
subclass, inheritance 196
subexpressions, referring to 328
subroutines compared to functions and methods 102
substring method, String object 81 , 300 , 311
superclass, inheritance 196
switch case statements
replacing if statements 71
use of break statements 68
and return statements 72
using 68
using for whoWon function 69
switch statements 43
syntax 4
syntax errors 343
assigning instead of comparing 351
error notification 346
HTML issues 350
JavaScript and 346
mismatched parentheses 351
missing quotes 351
using reserved words as identifiers 351
variance in case in an identifier 348