INDEX
HTML5 video, 191
JavaScript, 10
restore operation, coordinate systems and, 105
result variable, rock-paper-scissors game
sample and, 268, 270
return keyword, 27
RGB values, 8, 74
rock-paper-scissors game (sample), 259–285
building, 275–284
customizing, 262, 284
displaying results for using animation,
270–272
graphical buttons for, 260, 263–266
rules of the game, 259, 267
testing/uploading, 284
versions of, 259
rotations, for drawings, 103–107
S
safe web fonts, 190, 269
samples
ball, illustrating ballistics simulation, 97
blackjack card game, 317–346
bouncing ball, 67–96
cannonball, 97, 111–128, 140
craps game, 21–66
date and time storage/retrieval application,
224–230
favorite web sites, 2–19
Hangman game, 287–316
mazes, 213–258
memory game, 141–177
number of days in the month calculation, 29
quiz, 179–211
rock-paper-scissors game, 259–285
slingshot, 98, 107–111, 128–140
in this book, downloading, 100
sans-serif fonts, 150
save operation, coordinate systems and, 105
savewalls function, for mazes sample, 233
saving your work, 12, 40
Score label, for rock-paper-scissors game
sample, 260
scores
local storage and, 257
rock-paper-scissors game sample and, 262,
268
script element, 10, 30, 187
scripting languages, 10
scripts
for Hangman game word list, 295
terminology and, 214
seconds, 76, 77
secret variable, 300, 301
secs element, 77
section element, 7, 8, 187
semicolon (;), terminating statements, 11, 26
setInterval function
bouncing ball sample and, 76, 77
rock-paper-scissors game sample and, 270
slingshot sample and, 110
setTimeout function
bouncing ball sample and, 76, 77
memory game sample and, 148
quiz sample and, 201
setupgame function
for Hangman game sample, 302
for quiz sample, 193
showhouse function, for blackjack card game
sample, 331
shuffle function
for blackjack card game sample, 328, 331
for memory game sample, 152, 155, 167
singleton tags, 5, 6
site logo, 18
size variable, 270
slash (/)
in ending HTML tag, 4
indicating comments, 47, 155, 221
omitted, 5
for singleton tag, 5
Sling function, for slingshot sample, 102, 103,
107, 129
slingshot (sample), 98, 107–111
building, 111, 128–139
chicken and feathers for, 100, 110, 128
drawing the slingshot, 107
pulling the slingshot, 108
testing/uploading, 140
slots array, 186
source element, 191, 273
splice method, 110
split method, 231
square brackets ([ ]), 75, 184, 270
square of the distance, 110