Gregory M. Kapfhammer
Course Web Site
Office Hours
Teaching Assistants
Slack Communication
Relevant Tweets
Email Communication
Key Concept
Corresponding Diagram
In-Class Discussion
In-Class Activity
Details in the Textbook
Inline
Embedded
External
Alternatives similar to CSS programming!
document.write()
alert()
Allows us to implement conditional logic
if (age > 50)
if (hoursOfDay > 4 && hoursOfDay < 12)
There is an else component for a backup plan
Any questions about the use of this construct?
Review Section 8.5 for more details
false
, null
, and ""
Perform some action repeatedly
Looping constructs: for
, while
, do-while
What are the similarities and differences?
When would you decide to use a certain construct?
Loops can tax the resources of a computer
Arrays allow you to store a fixed number of variables
All values in the array are normally of the same type
Indexing an array can lead to exception cases
Any questions about using arrays in JavaScript?
years[i]
month[0][3]