HOUR 7:Controlling Flow with Conditions and Loops
What You’ll Learn in This Hour:
• Testing variables with the if
statement
• Using various operators to compare values
• Using logical operators to combine conditions
• Using alternative conditions with else
• Creating expressions with conditional operators
• Testing for multiple conditions
• Performing repeated statements with the for
loop
• Using while
for a different type of loop
• Using do...while
loops
• Creating infinite loops (and why you shouldn’t)
• Escaping from loops and continuing loops
• Looping through an array’s properties
Statements in a JavaScript program generally execute in the order in which they appear, one after the other. Because this isn’t always practical, ...
Get Sams Teach Yourself JavaScript in 24 Hours 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.