Art 114: Interactive Media and Design

Spring 2025 | Harrisburg Area Community College

Instructor: Rich Hauck, MPS

Exercise 4

Conditional Statements, Arrays, and Loops

  • Ask the user for their age. Use an if statement to display different alerts based on whether they are a minor (under 18), an adult (18 to 64), or a senior(65+).
  • Create an array of colors and use a loop to display each color on the page