3. Your First Web App

In This Chapter

Around and Around with Loops 50

Passing a Value to a Function 55

Detecting Objects 57

Working with Arrays 59

Working with Functions That Return Values 61

Updating Arrays 62

Using Do/While Loops 64

Calling Scripts Multiple Ways 66

Combining JavaScript and CSS 68

Checking State 71

Working with String Arrays 77

Now that you’ve gotten your feet wet, let’s wade a bit deeper into the JavaScript language. In this chapter, we’ll go into more detail about the basic elements of JavaScript and introduce you to other aspects of the JavaScript language, such as loops, arrays, and more about functions (don’t let your eyes glaze over; we promise that it’ll be easy).

You’ll see how you can use JavaScript to write your Web ...

Get JavaScript: Visual QuickStart Guide, Eighth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.