Summary
In this hour, you've learned two ways to control the flow of your scripts. First, you learned how to use the if statement to evaluate conditional expressions and react to them. You also learned a shorthand form of conditional expression using the ? operator, and the switch statement for working with multiple conditions.
You also learned about JavaScript's looping capabilities using for, while, and other loops, and how to control loops further using the break and continue statements. Lastly, you looked at the for…in loop for working with each property of an object.
In the next hour, you'll look at JavaScript's built-in functions, another essential tool for creating your own scripts. You'll also learn about third-party libraries that enable you to create complex effects with simple scripts.
|