CONTENTS
v
Contents
Contents at a Glance................................................................................................ iv
Contents..................................................................................................................... v
About the Author ...................................................................................................... x
About the Technical Reviewer ............................................................................... xi
Acknowledgments ................................................................................................... xii
Introduction ............................................................................................................ xiii
Chapter 1: The Basics ............................................................................................... 1
Introduction .....................................................................................................................................................
Critical requirements.......................................................................................................................................
HTML5, CSS, and JavaScript features ..........................................................................................................
Basic HTML structure and tags ..................................................................................................................
JavaScript programming ...........................................................................................................................
Building the application and making it your own ..........................................................................................
Testing and uploading the application..........................................................................................................
Summary ........................................................................................................................................................
Chapter 2: Dice Game ............................................................................................. 21
Introduction ...................................................................................................................................................
Critical requirements.....................................................................................................................................
HTML5, CSS, and JavaScript features ........................................................................................................
Pseudo-random processing and mathematical expressions..................................................................
Variables and assignment statements .....................................................................................................
Programmer-defined functions.................................................................................................................
Conditional statements: if and switch......................................................................................................
Drawing on the canvas ..............................................................................................................................
Building the application and making it your own ..........................................................................................
Throwing a single die .................................................................................................................................
Throwing two dice ......................................................................................................................................
The complete game of craps .....................................................................................................................