Table of Contents
Introduction 1
Part I: What Is JavaScript? Alert! JavaScript Is Awesome! 5
Chapter 1: Programming the Web 7
Chapter 2: Understanding Syntax 22
Chapter 3: Giving and Receiving Data 33
Chapter 4: Fiddling with Web Applications 51
Part II: Animating the Web 69
Chapter 5: JavaScript and HTML 71
Chapter 6: JavaScript and CSS 89
Chapter 7: Building an Animated Robot 104
Part III: Getting Operations 123
Chapter 8: Building Your Dream Car with Operands 125
Chapter 9: Putting It Together with Operators 136
Chapter 10: Creating Your Own JavaScript Word Game 153
Part IV: Arrays and Functions 171
Chapter 11: Creating and Changing Arrays 173
Chapter 12: Making It Functional 190
Chapter 13: Creating a Wish List Program 206
Part V: Freedom of Choice 231
Chapter 14: Making Decisions with the If...Else Statement 233
Chapter 15: Doing Different Things with Switch 252
Chapter 16: Choose Your Own Adventure 267
Part VI: Loops 293
Chapter 17: What’s This Loop For? 295
Chapter 18: Using While Loops 309
Chapter 19: Building a Lemonade Stand 326
Index 355